What are the differences between thread dump and heap dump ?

Questions by kirankumar samudrala   answers by kirankumar samudrala

Showing Answers 1 - 2 of 2 Answers

Shelly Gulati

  • Mar 26th, 2012

A thread dump is a dump of all live threads at the instant the thread dump is taken. Thus useful for analysing execution problems e.g. thread deadlock.It is used when the server is hung and we want to see the threads executing and take their dump.

A heap dump is a JVM facility that generates the dump of the state of the Java heap memory or live objects. Thus useful for analysing some memory issues.

  Was this answer useful?  Yes


  • Jul 14th, 2017

Thread dump: thread dump is the snapshot of threads, we can use thread dump identify is there any struc threads or blocking threads, or if there are any dead locks heapdump:heap dump is the dump of heap it is based on new ,old generation objects of JVM useful for analysing some memory issues, heapdump used to identify which objects are cause memory leaks

  Was this answer useful?  Yes


  • Apr 23rd, 2018

Heap dump:
It contains all objects information heap memory.
When ever we will get memory related issues that time we need to generate heap dump for finding root cause.

Thread dump or Java core:
It contains all threads information (waiting, run, hung, deadlock threads). Whenever we will get hung, dead lock issues that time we need to generate heap dump for finding root cause.

We will use kill -3 command to generate both dumps in Linux.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions