- Add argument
-XX:+HeapDumpOnOutOfMemoryError
and it will dump to java_pid.hprof file in the working directory. - Add argument
-XX:HeapDumpPath=/path/to/output-dir
to specify the output directory for the dump file. For example:-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$HOME/JavaHeapDumps/
No comments:
Post a Comment