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 99314 - Profile threads started after entering any of root methods option doesn't work as expected
Summary: Profile threads started after entering any of root methods option doesn't wor...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 22:25 UTC by Alexander Kouznetsov
Modified: 2007-11-01 12:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2007-03-28 22:25:48 UTC
Profiler 070327
NetBeans IDE Dev (Build 200703272330)
1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
Windows XP version 5.1 running on x86
ru_RU (nb); Cp1251

Steps to reproduce:
- Create custom CPU profiling for Anagram Game App
- Select nextTrialActionPerformed method as root
- Enable "Profile threads started after entering any of root methods" option
- Run Profiling
- RESULT: New Threads are profiled before the root method is invoked.
Comment 1 Alexander Kouznetsov 2007-03-28 22:27:31 UTC
I would like to mention that this issue was already filed as issue 71045 but was
incorrectly closed as duplicate of issue 69303
Comment 2 J Bachorik 2007-09-26 10:23:20 UTC
it seems that this feature has never actually worked as it should have. what it does now is that it profiles *ALL*
threads started within the application independently of whether a defined root method was hit or not.
passing to thurka for evaluation as a proper fix would involve few changes in the instrumentation logic. in case it's
too difficult to implement it we should consider disabling the option in UI.
Comment 3 Alexander Kouznetsov 2007-09-26 15:13:25 UTC
I believe that this option is essential for profiling especially in dynamic attach mode, so, probably, its wording needs
to be modified to, for example, "Profile All Newly Started Threads".
Comment 4 Jiri Sedlacek 2007-09-26 15:21:12 UTC
You're right, actually that's exactly what we are thinking of - renaming the setting to one of:

 - Profile New Runnables
 - Profile All Runnables

That would be an ideal fix - just rename the setting:o)
Comment 5 Alexander Kouznetsov 2007-10-29 19:09:46 UTC
IMHO, Profile New Threads is the best variant. Profile New Runnables is a little bit too specific but is ok also.

Profile All Threads/Runnables doesn't seem to work because already started threads most probably will not be affected.
Comment 6 Jiri Sedlacek 2007-11-01 12:53:51 UTC
Label changed to "Profile new Threads/Runnables", tooltip changed to "If selected, classes invoked from new Threads or
Runnables are automatically instrumented." Please note that "Runnables" is more general than "Threads", not more
specific, and exactly describes how it works.

Fixed in trunk.


/cvs/profiler/modules/main/src/org/netbeans/modules/profiler/ui/stp/Bundle.properties,v  <--  Bundle.properties
new revision: 1.3; previous revision: 1.2