I have encountered below exception during execution of below command
jmap -dump:format=b,file=heap_dump.bin
output:
Brian's comment is helpful to resolve the issue.
If you are using G1GC
algorithm in 64 bit machine:
Below command does not work ( excluding live
option)
jmap -J-d64 -dump:format=b,file=<heap_dump_filename> <pid>
you have to use below option to get the heap dump
jmap -J-d64 -dump:live,format=b,file=<heap_dump_filename> <PID>
There are some suggestions to use -F
option to force heap dump but as per oracle technotes:
-F Force. Use with jmap -dump or jmap -histo option if the pid does not respond. The live suboption is not supported in this mode.
Since heap dump is required with G1GC option, above option can't be used.