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 207204 - Select part(s) of timeline given a method on a stack
Summary: Select part(s) of timeline given a method on a stack
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 11:27 UTC by Jaroslav Tulach
Modified: 2012-01-26 15:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Snapshot that does "not" contain org.netbeans.core.startup.MainLookup.modulesClassPathInitialized() (371.09 KB, application/octet-stream)
2012-01-26 08:14 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-01-12 11:27:12 UTC
In order to analyse a sequence of operations in .npss file, it is important   to select the right interval and see snapshot just for that interval. Often,  
the interval is defined by the time a given method is on stack. As the  
business need part of this report documents, this is not currently easy at  
all. 

Could we invest a bit and add an action: "show when this method is on stack in  the time line?"  

It would have helped me, it will likely help me again soon (as the Abrams  
start still likely has similar bottlenecks), it would make the profiler  
better  
for everyone. Last, but not least it could be a base for "analyze lock  
contention" support, as that one is basically about finding the intervals  
when  
a given lock is being held. 


Details: I am using the CLI utilities to generate a npss snapshot 
http://wiki.netbeans.org/FitnessViaCLITimeLine 
and I am analyzing it in the profiler timeline view. 

I've noticed that one of the differences is the delay when a waitFinished()  
method is waiting for other threads to compute something. How can I find out  
who we are waiting for? 

The best is to select just the part of timeline when the waitFinished() method  
is on the stack! Then I'll see the main thread blocked, and all other threads  
doing something which will reveal what the main thread is waiting for. 
This is a trivial algorithmic operation. However there is no support from the  
profiler to do it via UI. As such I had to do it manually, by dividing ranges  
half by half and inspecting whether the waitFinished() method is still on  
stack or not. Took me about 30min and I did it wrong (as there were two  
invocations of the method in the timeline; I have not noticed and I was  
concentrating on the wrong one). After discussion with Tomáš Hůrka we found  
the second invocation and I could conclude that the system is being slowed  
down by processing NetBenas mime type registrations (which I plan to make  
more effective now). However it took us about hour of our work.
Comment 1 Tomas Hurka 2012-01-16 20:04:08 UTC
changeset:   210436:b43e221c9cc4
user:        Tomas Hurka <thurka@netbeans.org>
date:        Mon Jan 16 20:58:30 2012 +0100
summary:     issue #207204, initial version, which just prints intervals to console
Comment 2 Jiri Sedlacek 2012-01-17 14:31:12 UTC
Intervals are now marked in the timeline: http://hg.netbeans.org/profiler-main/rev/620d0fe6d8d7
Comment 3 Jiri Sedlacek 2012-01-18 15:36:03 UTC
Implemented. Please provide comments and verify.
Comment 4 Quality Engineering 2012-01-25 16:43:34 UTC
Integrated into 'main-golden', will be available in build *201201250600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b43e221c9cc4
User: Tomas Hurka <thurka@netbeans.org>
Log: issue #207204, initial version, which just prints intervals to console
Comment 5 Jaroslav Tulach 2012-01-26 08:13:16 UTC
Does not work for me. In the attached snapshot select:

org.netbeans.core.startup.MainLookup.modulesClassPathInitialized()	6.123302	1141 ms (6,1%)	131 ms	1

and choose select intervals. No intervals are selected.
Comment 6 Jaroslav Tulach 2012-01-26 08:14:07 UTC
Created attachment 115258 [details]
Snapshot that does "not" contain org.netbeans.core.startup.MainLookup.modulesClassPathInitialized()
Comment 7 Tomas Hurka 2012-01-26 15:06:27 UTC
(In reply to comment #5)
> Does not work for me. In the attached snapshot select:
> 
> org.netbeans.core.startup.MainLookup.modulesClassPathInitialized()    6.123302 
>   1141 ms (6,1%)    131 ms    1
> 
> and choose select intervals. No intervals are selected.

You are right. This is covered by issue #207774 and it is already fixed.