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.
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.
Created attachment 33820 [details] test
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
With profile project it seems to work fine with todays build.
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
Changing target milestone to dev, since NetBeans 6.0 is in high resistance mode.
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
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