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

improve jcmd GC.class_histogram to support parallel

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: