Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
12.0, 12.0.1
Description
I am trying to generate .hprof file according to the Java Profile 1.0.2 specification. I believe I am fully following the specification (which allows multiple heap segments), but NetBeans Profiler library chokes up on my file and yields following exception:
java.lang.IllegalArgumentException: Invalid dump tag 0 at position 1415 at org.netbeans.lib.profiler.heap.HprofHeap.readDumpTag(HprofHeap.java:1138) at org.netbeans.lib.profiler.heap.HprofHeap.fillHeapTagBounds(HprofHeap.java:1215) at org.netbeans.lib.profiler.heap.HprofHeap.<init>(HprofHeap.java:140) at org.netbeans.lib.profiler.heap.HeapFactory.createHeap(HeapFactory.java:80) at org.netbeans.lib.profiler.heap.HeapFactory.createHeap(HeapFactory.java:49)
I am able to generate the file with a single heap segment (see singleheapsegment.hprof) as well as multiple heap segments (see multiheapsegment.hprof). The first one can be opened by NetBeans 12.x, the latter cannot.
In my usecase I'd like to generate the file incrementally while my application is running. As such it is essential to flush the heap segments multiple times, otherwise I may run out of memory. It would be fantastic if the NetBeans heap profiler library could be enhanced to work with multiheapsegment files properly.
Attachments
Attachments
Issue Links
- links to