Difference between javacore, thread dump and heap dump in Websphere

后端 未结 5 1949
悲哀的现实
悲哀的现实 2021-01-30 02:01

Can someone tell me the exact difference between javacore, thread dump and heap dump? Under which situation each of these are used??

5条回答
  •  伪装坚强ぢ
    2021-01-30 02:58

    A Thread dump is a dump of all threads's stack traces, i.e. as if each Thread suddenly threw an Exception and printStackTrace'ed that. This is so that you can see what each thread is doing at some specific point, and is for example very good to catch deadlocks.

    A heap dump is a "binary dump" of the full memory the JVM is using, and is for example useful if you need to know why you are running out of memory - in the heap dump you could for example see that you have one billion User objects, even though you should only have a thousand, which points to a memory retention problem.

提交回复
热议问题