The heap profiling agent

The JVM TI hprof agent was recently removed from the Java platform. Here are the key terms associated with this change:

  • Tool Interface (TI): This is a native programming interface that allows tools to control the execution of applications that are being run inside the Java Virtual Machine. The interface also permits state inquiries. The full nomenclature for this tool is the Java Virtual Machine Tool Interface, or JVM TI.
  • Heap Profiling (HPROF): This is an internal JDK tool that's used for profiling a JVM's use of CPUs and the heap. The most common exposure developers have to hprof is the file that is generated when following a crash. The generated file contains a heap dump.

The Java 11 JDK does not contain the hprof agent. It was removed largely because there are superior alternatives available. Here is a table of their related functionality:

HPROF Functionality Alternative

Allocation Profiler
(heap=sites)

Java VisualVM

CPU Profiler
(cpu=samples)
(cpu=times)

Java VisualVM
Java Flight Recorder
Heap Dumps
(heap=dump)

Internal JVM functionality:

  • GC.heap_dump(icmd <pid> GC.heap_dump)
  • jmap -dump

 

Interestingly, when HPROF was originally created, it was not intended to be used in production. In fact, it was only meant to test code for the JVM Tool Interface. So, with the advent of the modern Java platform, the HPROF library (libhprof.so) will no longer be part of the JDK.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset