On Fri, 5 Feb 2021 15:32:26 GMT, Lin Zang <lz...@openjdk.org> wrote: >> One implementation is in the JVM itself, to be used when the JVM is still >> running well, and not just from command line tools. Heap dumping can also be >> triggered by the JVM itslef by setting flags like -XX:+HeapDumpBeforeFullGC. >> The other implementation is in SA, to be used on a core file or a hung JVM >> process, although it can also be used on a JVM that is still running well. >> BTW, there used to be a 3rd implementation. The old hprof profiler (a JVMTI >> agent) also was used to generate hprof files. > > Dear @plummercj, > >> `--dumpfile` and `--gz` can only be used with `--binaryheap`. That should be >> made clear in the help text. > > I added indentation for these two sub-options. > >> * SA's `jhsdb jmap --binaryheap` (which uses JMap.java with `-heap:format=b`) >> * SA's clhsdb `dumpheap` command (which also uses JMap.java with >> `-heap:format=b`) >> * executing SA's `sun/jvm/hotspot/tools/JMap` class directly >> * `jmap -dump` command (Uses Attach API's `heapdump` command, which uses >> hotspot `HeapDump` class) >> * `GC.heap_dump` dcmd, which also uses the hotspot `HeapDumper` class > All 5 commands help message have been tested.
Hi Lin, Thank you for the update with requested changes. Please, note, my suggestion was rough and still needs to be tested/checked for potential bugs. :) I'll look at changes in other files as well. Thanks, Serguei ------------- PR: https://git.openjdk.java.net/jdk/pull/1712