This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 53241 - Strange absolute timer behaviour
Summary: Strange absolute timer behaviour
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: mishadmitriev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-11 15:50 UTC by Jan Lahoda
Modified: 2006-03-24 12:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot with profiled application times. (68.44 KB, image/png)
2005-01-11 15:50 UTC, Jan Lahoda
Details
Screenshot from situation 2a (79.35 KB, image/png)
2005-01-12 12:17 UTC, Jan Lahoda
Details
Screenshot from situation 2c (79.41 KB, image/png)
2005-01-12 12:18 UTC, Jan Lahoda
Details
The testing "trivial" application. (12.31 KB, application/octet-stream)
2005-01-12 12:19 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2005-01-11 15:50:06 UTC
[recent sources, NB4.1, JDK1.4.2, free form
project, Linux]

During profiling, the absolute timer behaves quite
strangely:
1. The values it provides seems not to be correct
(they seem to be to small).
2. The absolute time can even be lower after
getting new result (for example it can go from
260ms to 259ms, etc.)

The CPU time seems to be OK (at least for the
first sight).

I am attaching screenshot showing the situation.

Note: the profiled application is still running.
Comment 1 Jan Lahoda 2005-01-11 15:50:39 UTC
Created attachment 19617 [details]
Screenshot with profiled application times.
Comment 2 Jan Lahoda 2005-01-11 16:00:38 UTC
It seems that on Solaris the absolute timer works OK.
Comment 3 Jan Lahoda 2005-01-11 16:49:37 UTC
Probably connected problem: also the time in the threads combo behaves
very strangely, after getting results, the absolute thread time is 0,
after clicking on the combo it gets (seemingly random) negative value.
Comment 4 mishadmitriev 2005-01-12 07:04:07 UTC
One comment, so far just FYI: the thread CPU time is badly wrong in 
this example. Thread CPU time can never be greater than absolute 
time, because it is, roughly speaking, a proportion of absolute time 
that the given thread's user code executes. The values for CPU time 
shown here are garbage, but hopefully this should be fixed by one of 
my today's putbacks.

Also, on Linux, unlike other OSes that we support, there is in fact 
no real thread CPU timer (currently at least). So we should see the 
same values for absolute and thread CPU times.
Comment 5 mishadmitriev 2005-01-12 07:24:39 UTC
Ok, I've just tried the latest JFluid version on the javac 
application running on Linux (using remote profiling) and reported 
results seem to be correct.

Please try your test again, and let me know how it worked. Thanks,

Misha
Comment 6 Jan Lahoda 2005-01-12 12:16:58 UTC
Well, it works differently than before, but not much better. I have
tested three applications:
1. Java2D demo:
a) The absolute times and CPU times looked acceptable, but the
absolute time != CPU time. The difference was several milisecond.
b) In the thread combo, the absolute time != absolute time in the root
of CCT, and this time even was lowered as time runned (it was not
constatly growing).
2. Trivial application, simple infinite loop printing "1" to the
output (I will attach this application's project, the project requires
NB4.1, but the class itself should work everywhere):
a) the absolute and CPU time were similar, but (obviously) not
correct. After several seconds of profiling, the profiler claimed that
only a small time was consumed.
b) the times sometimes can go lower.
c) once it even happened, that all time were zero.
3. My "Generator" application (it is too big to be attached, I can
send it to you offline). It behave similarly to the trivial
application, only the numbers were a bit different.

I am also attaching screenshots for case 2a and 2c.

All performed on Linux, JDK1.4.2, NB4.1 (recent build).
Comment 7 Jan Lahoda 2005-01-12 12:17:51 UTC
Created attachment 19636 [details]
Screenshot from situation 2a
Comment 8 Jan Lahoda 2005-01-12 12:18:29 UTC
Created attachment 19637 [details]
Screenshot from situation 2c
Comment 9 Jan Lahoda 2005-01-12 12:19:27 UTC
Created attachment 19638 [details]
The testing "trivial" application.
Comment 10 Jan Lahoda 2005-01-20 10:17:55 UTC
Well, using a recent sources, the problem seems to be gone (including
the combo). It still seems that the absolute timer != CPU timer
(usually there is difference a few miliseconds), but I guess this is
caused by some system insufficiencies.
Comment 11 Jan Lahoda 2005-02-25 10:39:36 UTC
.