Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8046661

JEP 240: Remove the JVM TI hprof Agent

    Details

    • JEP Type:
      Feature
    • Exposure:
      Open
    • Subcomponent:
    • Scope:
      JDK
    • Discussion:
      serviceability dash dev at openjdk dot java dot net
    • Effort:
      XS
    • Duration:
      XS
    • Alert Status:
       Green
    • JEP Number:
      240

      Description

      Summary

      Remove the hprof agent from the JDK.

      Non-Goals

      The ability to create heap dumps in the hprof format will remain.

      Motivation

      The useful features of the hprof agent have been superseded by better alternatives.

      Heap dumps (heap=dump)

      This functionality has been superseded by the same functionality in the JVM. Using the Diagnostic Command GC.heap_dump (jcmd <pid> GC.heap_dump) it is possible to ask the JVM to dump the heap in the hprof file format (this is also available via jmap -dump).

      Allocation profiler (heap=sites)

      The Java VisualVM tool provides the same functionality, as do a number of third-party profilers.

      CPU profiler (cpu=samples, cpu=times)

      The CPU profiler has a couple of shortcomings which are described in some detail in http://www.brendangregg.com/blog/2014-06-09/java-cpu-sampling-using-hprof.html and elsewhere. There are other tools that provide better functionality with fewer problems. Among them are Java VisualVM and Java Flight Recorder, which are bundled with the JDK, as well as a number of third-party profilers.

      Demonstration code

      The hprof agent was written as demonstration code for the

      JVM Tool<br /> Interface

      and not intended to be a production tool. The code and documentation contain a number of statements of the following form:

      This is demonstration code for the JVM TI interface and use of BCI, it is not an official product or formal part of the JDK.

      Description

      Stop building and shipping the hprof agent library (libhprof.so) as part of the JDK.

      Move the code to a separate project under OpenJDK. The code is still valuable as a demonstration of the capabilities of JVM TI, but it does not live up to the requirements for a shipping product.

      The change should to be documented in the appropriate release notes. Considering the extensive disclaimers already present in the documentation, users should not be surprised that hprof is being removed, but the documentation should be updated to point to alternative tools.

      Testing

      Existing hprof agent tests will need to be removed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sla Staffan Larsen (Inactive)
                Reporter:
                sla Staffan Larsen (Inactive)
                Owner:
                Staffan Larsen (Inactive)
                Reviewed By:
                Mikael Vidstedt
                Endorsed By:
                Mikael Vidstedt
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Integration Due: