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 206105

Summary: CollapsedHashMap analysis not cleanly cancelable
Product: profiler Reporter: Jesse Glick <jglick>
Component: BaseAssignee: Jiri Sedlacek <jis>
Status: RESOLVED WONTFIX    
Severity: normal Keywords: PERFORMANCE
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 113982    
Bug Blocks:    

Description Jesse Glick 2011-12-07 19:24:20 UTC
I opened a heap dump, selected a few items in the Analysis tab, and clicked Perform Analysis. After a couple of minutes, I decided the analysis was taking too long and so I clicked Cancel. But I continued to see heavy disk and CPU activity for a while afterwards. I took a self-sampler and saw:

HeapWalker Processor	100.0	17538 ms (100%)	17538 ms	1
org.openide.util.RequestProcessor$Processor.run()	100.0	17538 ms (100%)	17538 ms	1
org.openide.util.RequestProcessor$Task.run()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.AnalysisController$1.run()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.memorylint.MemoryLint.process()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.memorylint.IteratingRule.perform()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.memorylint.rules.CollapsedHashMap.summary()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.memorylint.rules.CollapsedHashMap$HMRecord.toString()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.modules.profiler.heapwalk.memorylint.MemoryLint.getRootIncommingString()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.lib.profiler.heap.InstanceDump.getNearestGCRootPointer()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.lib.profiler.heap.NearestGCRoot.getNearestGCRootPointer()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.lib.profiler.heap.NearestGCRoot.computeGCRoots()	100.0	17538 ms (100%)	17538 ms	1
org.netbeans.lib.profiler.heap.NearestGCRoot.computeOneLevel()	99.939354	17528 ms (99.9%)	17528 ms	2
org.netbeans.lib.profiler.heap.NearestGCRoot.writeConnection()	73.8887	12959 ms (73.9%)	12959 ms	397
....
Comment 1 J Bachorik 2012-05-21 08:14:25 UTC
The main problem is that the computation of references is not cancelable itself. Effectively, the analysis is stuck waiting for the heapwalker engine to finish the computation and can not be canceled.
Comment 2 J Bachorik 2012-08-01 08:33:56 UTC
changing owner
Comment 3 Jiri Sedlacek 2012-12-04 14:00:12 UTC
The Analysis view of the HeapWalker is no more being developed (replaced by the OQL Console) and is disabled by default in Profiler options. Won't fix.
Comment 4 Jesse Glick 2012-12-04 16:27:47 UTC
Pity, this was the most useful part of the profiler; I hope there is a direct replacement that is as easy to use.