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 84684 - [ProfilingPoints] Profiling Points don't work with cpu profiling of a file
Summary: [ProfilingPoints] Profiling Points don't work with cpu profiling of a file
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 12:12 UTC by ehucka
Modified: 2008-08-22 06:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test (1.00 KB, application/octet-stream)
2006-09-12 12:12 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2006-09-12 12:12:05 UTC
Reproduce:

1. use attached sources
2. put PP reset results in Test.java at line with reset string
3. put PP take snapshot at line with 'take snapshot'
4. start profiling of the file - Profile | Profile Other | Profile File
5. select cpu profiling, part of application, select root methods as all methods
 in Work.java
6. start profiling

Result: the application will finish without taken snapshot

Use Case: I want to profile a piece of code (unit test) with all jdk methods but
without initialization JVM methods like class loading etc.
Comment 1 ehucka 2006-09-12 12:12:44 UTC
Created attachment 33820 [details]
test
Comment 2 Jiri Sedlacek 2007-03-22 14:29:27 UTC
Still valid after Profiling Points reimplementation, also for Profile Project:

com.sun.tools.profiler.results.cpu.CPUResultsSnapshot$NoDataAvailableException
        at com.sun.tools.profiler.results.cpu.CPUResultsSnapshot.<init>
(CPUResultsSnapshot.java:104)
        at com.sun.tools.profiler.ProfilerClient.getCPUProfilingResultsSnapshot
(ProfilerClient.java:639)
        at 
org.netbeans.modules.profiler.ppoints.TakeSnapshotProfilingPoint.takeSnapshot
(TakeSnapshotProfilingPoint.java:259)
[catch] at org.netbeans.modules.profiler.ppoints.TakeSnapshotProfilingPoint.hit
(TakeSnapshotProfilingPoint.java:169)
        at 
org.netbeans.modules.profiler.ppoints.ProfilingPointsManager.profilingPointHit
(ProfilingPointsManager.java:417)
        at com.sun.tools.profiler.client.RuntimeProfilingPoint.execute
(RuntimeProfilingPoint.java:132)
        at com.sun.tools.profiler.results.cpu.CPUCallGraphBuilder$1.run
(CPUCallGraphBuilder.java:909)
        at com.sun.tools.profiler.results.cpu.CPUCallGraphBuilder.onBatchStop
(CPUCallGraphBuilder.java:856)
        at 
com.sun.tools.profiler.results.cpu.CPUDataFrameProcessor.fireBatchStop
(CPUDataFrameProcessor.java:389)
        at 
com.sun.tools.profiler.results.cpu.CPUDataFrameProcessor.processDataFrame
(CPUDataFrameProcessor.java:337)
        at 
com.sun.tools.profiler.results.ProfilingResultsDispatcher$QueueProcessor.process
Queue(ProfilingResultsDispatcher.java:108)
        at 
com.sun.tools.profiler.results.ProfilingResultsDispatcher$QueueProcessor.run
(ProfilingResultsDispatcher.java:56)
        at java.lang.Thread.run(Thread.java:619)
SEVERE
com.sun.tools.profiler.results.cpu.CPUResultsSnapshot$NoDataAvailableException
        at com.sun.tools.profiler.results.cpu.CPUResultsSnapshot.<init>
(CPUResultsSnapshot.java:104)
        at com.sun.tools.profiler.ProfilerClient.getCPUProfilingResultsSnapshot
(ProfilerClient.java:639)
        at com.sun.tools.profiler.ProfilerClient.getCPUProfilingResultsSnapshot
(ProfilerClient.java:622)
[catch] at org.netbeans.modules.profiler.ResultsManager.takeSnapshot
(ResultsManager.java:168)
        at 
org.netbeans.modules.profiler.NetBeansProfiler$IDEAppStatusHandler.handleShutdow
n(NetBeansProfiler.java:1547)
        at com.sun.tools.profiler.ProfilerClient$ServerListener$1.run
(ProfilerClient.java:1621)
Caused by: org.openide.ErrorManager$AnnException: msg
        at org.openide.ErrorManager$AnnException.findOrCreate
(ErrorManager.java:851)
        at org.openide.ErrorManager$DelegatingErrorManager.annotate
(ErrorManager.java:629)
        at org.openide.ErrorManager.annotate(ErrorManager.java:429)
        at org.netbeans.modules.profiler.ResultsManager.takeSnapshot
(ResultsManager.java:178)
        ... 2 more
ALL [null]: Failed to obtain results snapshot, data is not available yet
Comment 3 Tomas Hurka 2007-03-23 17:06:10 UTC
With profile project it seems to work fine with todays build.
Comment 4 J Bachorik 2007-08-28 15:44:19 UTC
the problem is that a root method must be called before the profiling point is hit. this is plainly not the case since
you define root methods from the Work class but PPs are placed in the Test class so no root method has been hit before PP.
however, i'm not sure if this is a bug or a designed behaviour
Comment 5 Tomas Hurka 2007-11-07 10:35:44 UTC
Changing target milestone to dev, since NetBeans 6.0 is in high resistance mode.
Comment 6 Tomas Hurka 2008-08-21 14:47:45 UTC
Fixed in trunk.
changeset:   97162:c6057fca3951
user:        Tomas Hurka <thurka@netbeans.org>
date:        Thu Aug 21 15:39:46 2008 +0200
summary:     bugfix #84684, skip creation of instrumented method pack only if there is no profiling point for instrumented class

Comment 7 Quality Engineering 2008-08-22 06:00:37 UTC
Integrated into 'main-golden', available in build *200808220201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/c6057fca3951
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #84684, skip creation of instrumented method pack only if there is no profiling point for instrumented class