RFR: JDK-8327769: jcmd GC.heap_dump without options should write to location given by -XX:HeapDumpPath, if set [v2]

Matthias Baesken mbaesken at openjdk.org
Tue Mar 12 12:22:41 UTC 2024


> Currently jcmd command GC.heap_dump only works with an additionally provided file name.
> Syntax : GC.heap_dump [options] <filename>
> 
> In case the JVM has the XX - flag HeapDumpPath set, we should support an additional mode where the <filename> is optional.
> In case the filename is NOT set, we take the HeapDumpPath (file or directory);
> 
> new syntax :
> GC.heap_dump [options] <filename> .. has precedence over second option
> GC.heap_dump [options] …in case -XX: HeapDumpPath=p is set
> 
> This would be a simplification e.g. for support cases where a filename or directory is set at JVM startup with -XX: HeapDumpPath=p and writing to the path is intended/recommended for usage also in the jcmd case.

Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:

  alloc_and_create_heapdump_pathname adjust comment about freeing the returned  pointer

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/18190/files
  - new: https://git.openjdk.org/jdk/pull/18190/files/116c0572..e335d9ee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18190&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18190&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18190.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18190/head:pull/18190

PR: https://git.openjdk.org/jdk/pull/18190


More information about the hotspot-gc-dev mailing list