Questions tagged [heap-dump]

A heap dump is a snapshot of the memory of a Java process.

A heap dump is a snapshot of the memory of a Java process.

The snapshot contains information about the Java objects and classes in the heap at the moment the snapshot is triggered. Because there are different formats for persisting this data, there might be some differences in the information provided. Typically, a full garbage collection is triggered before the heap dump is written, so the dump contains information about the remaining objects in the heap.

All Objects: Class, fields, primitive values, and references.

All Classes: Class loader, name, super class, and static fields.

Garbage collection roots: Objects defined to be reachable by the JVM.

Thread Stacks and Local Variables: Call-stacks of threads at the moment of the snapshot, and information about local objects on a frame by frame basis.

A heap dump does not contain allocation information, therefore you cannot work out what created the objects or where the objects were created.

Source

485 questions
4
votes
1 answer

Heap Dump w/ high memory allocation in Android Studio never finishes

We have an app that is jumping from 30-something MB of memory allocation to over 500MB while navigating between activities. I can track allocations while that happens, and see WHAT is being held in memory, but I want to create an HPROF file of the…
jkane001
  • 1,694
  • 1
  • 15
  • 23
4
votes
4 answers

Eclipse memory allocation problem

I'm trying to analyse a ~800mb heap dump, which requires a bigger heap than the standard for my eclipse. however, when I go to the eclipse.ini file and set a -Xmx2g (or -Xmx2048m) I get an error "Failed to create the Java Virtual Machine". 1) yes, I…
filippo
  • 5,583
  • 13
  • 50
  • 72
4
votes
3 answers

How to create Heap Dump automatically when Java process Hits OutOfMemory Error?

I have Java program running in Linux platform and it crash quite often;at this situation, I would like to have heapdump automatically. Does anyone have script/method to create a Heap Dump Automatically when Java process Hits "OutOfMemory Error" on…
Thiyagarajan Varadharaj
  • 10,154
  • 5
  • 21
  • 18
4
votes
1 answer

How to take a heap dump in windows with minimum downtime?

I want to figure out why JVM heap usage on Elasticsearch node is staying consistently above 80%. In order to do this, I take a heap dump by running jmap.exe -heap:format=b 5348 (5348 is the Process ID). Then I can analyze the dump with…
svetli-n
  • 53
  • 1
  • 4
4
votes
0 answers

Eclipse Memory Analyzer - Export values

I am currently looking for a method to export data in mass quantities from a hprof dump using eclipse memory analyzer. The reason for this being is that the database that used to hold this data is now permanently unavailable so the only way of me…
Deuce bigalow
  • 301
  • 1
  • 12
4
votes
1 answer

Does -XX:+HeapDumpOnOutOfMemoryError create any security or performance issues?

Does the instruction to create an Heap Dump on out of memory error (-XX:+HeapDumpOnOutOfMemoryError) result in any security or noteworthy performance issues for Tomcat 7 in a production environment? (Of curse the server has to write the file when it…
Ralph
  • 118,862
  • 56
  • 287
  • 383
4
votes
1 answer

memory analysis from eclipse ide does not list any local process id when acquire heap dump dialog is clicked

Using memory analyzer from eclipse ide (kepler), I'm trying to acquire heap dump from a locally running VM while an program is running, however acquire heap dump dialog does not list any pid to select. I try to configure hdrof jmap dump…
burcak
  • 1,009
  • 10
  • 34
4
votes
2 answers

Does Java VisualVM gives correct Heap Size of heap dump (.hprof file)

I am analyzing a OutOfMemory issue. I got a dump of 800 MB (.hprof file) when i open it in MAT it shows heap size 53.2 MB as below Same dump i opened in Java VisualVM and I see Heap size around 769 MB Date taken: Tue Mar 18 05:25:59 IST 2014 …
Vipin
  • 4,851
  • 3
  • 35
  • 65
4
votes
2 answers

Java VisualVM missing features

I have a Java application, and I'd like to monitor it using Java VisualVM (jvisualvm). However, in the VisualVM window very little data can be seen. Also, I can't take a heap dump. Here is a screenshot of what it looks like, with another test app I…
PurkkaKoodari
  • 6,703
  • 6
  • 37
  • 58
4
votes
6 answers

How to take heap dump?

I want to collect heap dump on JVM crash So i wrote a simple code public class Test { private String name; public Test(String name) { this.name = name; } public void execute() { Map randomData = new…
Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
4
votes
0 answers

unable to convert java core dump to hprof with jmap

When trying to convert java core dump with jmap to hprof, i get this exection: Attaching to core core.26045 from executable /usr/java/jdk1.6.0_21/bin/java, please wait... Debugger attached successfully. Server compiler detected. JVM version is…
theSTIG
  • 159
  • 1
  • 6
4
votes
3 answers

heapdump size vs hprof size

I recently made a heapdump in a hprof format when my jboss server was running with a xms of 4096m and xmx of 4096m and a permsize of 512m. The hprof file generated is over 5gb. When I load the heapdump in visualvm, mat analyzer or yourkit, I only…
Michael
  • 233
  • 2
  • 4
  • 11
4
votes
2 answers

What is the breakdown of the statistics in a Java heap dump

Given this heap dump size no. of obj class 515313696 2380602 char[] 75476832 614571 * ConstMethodKlass 57412368 2392182 java.lang.String 44255544 614571 * MethodKlass 33836872 70371 *…
Carlos Jaime C. De Leon
  • 2,476
  • 2
  • 37
  • 53
3
votes
1 answer

Why the Application and it's resources are being kept in the memory after exiting in Android?

I have a simple Hello World application public class TestLeaksOnFinish extends Activity { static int ctr = 0; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView t = new…
Marc Van Daele
  • 2,856
  • 1
  • 26
  • 52
3
votes
1 answer

How can I collect a heap dump from Gradle tests in a Spring Boot Application?

I trying to diagnose a memory leak while running my integration tests in my Spring Boot App. When I am running : ./gradlew test -i --XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/ng.newbie/Desktop/heapdump.bin I keep getting OOM…
ng.newbie
  • 2,807
  • 3
  • 23
  • 57