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

improve jcmd GC.class_histogram to support parallel

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 17
    • core-svc
    • behavioral
    • minimal
    • add/remove/modify command line option
    • JDK

      TODO

      Summary

      Add a new sub-command option "parallel" to the existing "GC.class_histogram" jcmd command line option, which specifies how many threads to use to generate the heap histogram.

      Problem

      "jcmd GC.class_histogram" inspects the heap serially, which takes a long time when the heap is large. Heap iteration time can be significantly reduced by parallel iteration over the object graph.

      Solution

      Leverage the parallel histo iteration already implemented in jmap -histo.

      Specification

      Updated specification.

      GC.class_histogram
      Provide statistics about the Java heap usage.
      
      Impact: High: Depends on Java heap size and content.
      
      Permission: java.lang.management.ManagementPermission(monitor)
      
      Syntax : GC.class_histogram [options]
      
      Options: (options must be specified using the <key> or <key>=<value> syntax)
          -all : [optional] Inspect all objects, including unreachable objects (BOOLEAN, false)
          -parallel : [optional] Number of parallel threads to use for heap inspection. 0 (the default) means let the VM determine the number of threads to use. 1 means use one thread (disable parallelism). For any other value the VM will try to use the specified number of threads, but might use fewer. (INT, 0)

            mli Hamlin Li
            mli Hamlin Li
            Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: