How to make your heap dump more informative

By default, a heap dump contains almost no “JVM-internal” information. However, this information, such as the maximum heap size, GC type, GC tuning parameters, etc. can be very helpful in the JXRay analysis. Why is it useful? Here are some examples:1. If a heap dump is generated after an OutOfMemoryError is thrown, it is very helpful to know what the maximum heap size is. If total used heap, calculated by heap dump analysis, is much …

Continue Reading

JXRay 2.9 released

In this version: Heap dump analysis now takes into account JVM flags of the analyzed Java process, such as GC type, maximum heap size etc. The flags can be supplied by the user through a text file, or saved in the dump itself. The above feature allows JXRay to identify common mistakes with JVM flags and heap configuration It also allows for an accurate estimate of the G1 heap region size, which in turn helps …

Continue Reading

A heap dump from OutOfMemoryError contains lots of garbage: how can it happen?

Native code (typically C/C++) invoked from Java code may need to access contents of Java objects. For example, compression code (zip library) and I/O code operates on byte[] arrays that are created by the Java code. When native code goes through the contents of a Java array, it is highly desirable from the performance standpoint that this code reads/writes bytes directly from the heap, using raw machine addresses. However, that would break the fundamental GC …

Continue Reading