开发者

When does JVM produce dumps, other than out of memory

开发者 https://www.devze.com 2022-12-26 09:40 出处:网络
I need to now when does jvm produce 开发者_运维技巧hprof dumps other than out of memory situations.

I need to now when does jvm produce 开发者_运维技巧hprof dumps other than out of memory situations. Eg, does it produce an hprof when there is a high cpu usage? I see hprof files produces and there is no out of memory situation.


I does 'automatically' produce a heap dump only when out of memory and if it was configured to do so at startup (for example -XX:-HeapDumpOnOutOfMemoryError for a sun JVM)...

But you can also send a signal to the JVM to request for a dump (for example kill -Quit pid) on solaris...

So it depends on the OS and on the JVM but it is possible to ask for a dump...


In adition the JVM creates a core dump when a native library throws an expception.


What command-line JVM options are passed when starting your application? There are many HPROF options; some, like cpu=samples, write out a dump file every time the JVM exits.

0

精彩评论

暂无评论...
验证码 换一张
取 消