You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Tomáš Procházka (Jira)" <ji...@apache.org> on 2021/02/05 21:26:01 UTC

[jira] [Closed] (NETBEANS-4618) HeapFactory cannot process multi heap segment files

     [ https://issues.apache.org/jira/browse/NETBEANS-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomáš Procházka closed NETBEANS-4618.
-------------------------------------

> HeapFactory cannot process multi heap segment files
> ---------------------------------------------------
>
>                 Key: NETBEANS-4618
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4618
>             Project: NetBeans
>          Issue Type: Bug
>          Components: profiler - Base
>    Affects Versions: 12.0, 12.0.1
>            Reporter: Jaroslav Tulach
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 12.2
>
>         Attachments: multiheapsegment.hprof, singleheapsegment.hprof
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I am trying to generate {{.hprof}} file according to the [Java Profile 1.0.2|http://hg.openjdk.java.net/jdk6/jdk6/jdk/raw-file/tip/src/share/demo/jvmti/hprof/manual.html#mozTocId848088] 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:
> {code:java}
> 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)
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists