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 81769 - Selection of classes to instrument is confusing
Summary: Selection of classes to instrument is confusing
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-03 02:04 UTC by Jesse Glick
Modified: 2007-08-08 17:04 UTC (History)
1 user (show)

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 Jesse Glick 2006-08-03 02:04:09 UTC
NB dev build, 6.0 profiler, JDK 6, profiling NB dev module project set to use JDK 5.

I select Analyze Performance. By default it says "Entire Application" yet filter
says "Profile Only Project Classes". These two things seem to contradict one
another, but I try it anyway. Big mistake: app takes forever to start, and
Telemetry says thousands of methods are being instrumented, although my module's
functionality has not even been used yet except perhaps one or two classes.

When I actually look at the filter, it lists my project's packages - but these
are nearly invisible because it also seems to list every package in every module
my module depends on! Surely not what I expected.

Seems I can make up a custom filter which actually just includes my project, but
I have click through nested modal dialogs and type in all the packages in my
project by hand. Not very friendly.
Comment 1 Jiri Sedlacek 2006-08-09 13:06:31 UTC
Entire application mode means that you don't want to specify explicit root 
methods where profiling should start, instrumentation filter means which 
classes will/won't be instrumented-profiled. These are two different things, 
simply FROM WHERE vs. WHAT.

If your application takes forever to start, its a bug, but most likely only too 
many methods are being instrumented at the beginning which makes JVM and whole 
system not responsive for a (long) while.

It seems that the main problem is Profile Only Project Classes filter which 
doesn't behave as you've expected. Currently it uses all packages from profiled 
project and all subprojects (project.getLookup().lookup
(SubprojectProvider.class).getSubprojects()). This is useful for example for 
Enterprise Applications. But maybe this isn't the best approach for profiling 
NetBeans modules/suites. Could you please describe which behavior would fit 
your usecase better? Would you prefer two options "Profile Only Profiled 
Project Classes" and "Profile Only Profiled Project & Subprojects Classes"?

Note that there is an option "To QuickFilter" in Profile Only Project Classes 
list which will simplify manual definition of the filter, but I understand that 
it's rather a workaround than typical workflow.
Comment 2 Jesse Glick 2006-08-09 16:02:38 UTC
The two options you mentioned would be a reasonable improvement. In my case I
really only wanted to profile the classes in the project I selected (perhaps not
even all of these, but that would be a good starting point).

The "quick filter", if I remember correctly what that looked like, wasn't really
useful for me because it was a JTextField with hundreds and hundreds of class
names in it. I spent maybe ten minutes deleting things I knew I didn't want
before I gave up. A more usable UI, IMHO, would be a JTextArea of reasonable
size with a scrollbar and one package per line, sorted.
Comment 3 Alexander Kouznetsov 2007-03-12 15:19:15 UTC
According to feedback from customers having both Entire App and Profile Only
Project Classes options is confusing. Consider change of wording to mention root
methods.
Comment 4 Jiri Sedlacek 2007-08-08 14:14:53 UTC
Implemented two separate instr. filters - Profile Only Project Classes and Profile Project & Subprojects Classes. 
JTextField in QuickFilter dialog replaced by JTextArea (see Issue 105149), each package on separate line, sorted. 
jglick do you think this issue can now be closed?
Comment 5 Jesse Glick 2007-08-08 17:04:51 UTC
Sounds better. (Have not yet tried the new UI.)