RFR: JDK-8261034: improve jcmd GC.class_histogram to support parallel [v3]

Chris Plummer cjplummer at openjdk.java.net
Thu Feb 4 23:19:43 UTC 2021


On Thu, 4 Feb 2021 07:28:03 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> parallel -histo of jmap was added by JDK-8214535, it's better to support parallel for jcmd GC.class_histogram too.
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8261034: improve jcmd GC.class_histogram to support parallel

test/hotspot/jtreg/serviceability/dcmd/gc/ClassHistogramTest.java line 96:

> 94:                 {"-parallel=0"},
> 95:                 {"-parallel=1"},
> 96:                 {"-parallel=2"},

Is there a way to test invalid arguments within this test framework? It seems the assumption for the `run()` method is that the arguments are valid and a histogram should be in the output.

src/hotspot/share/services/diagnosticCommand.cpp line 562:

> 560:        "0 use system determined number of threads, "
> 561:        "1 use one thread, i.e., disable parallelism, "
> 562:        "n use n threads, n must be positive.",

"Number of parallel threads for heap iteration. "
       "0 means let the VM determined the number of threads. "
       "1 means use one thread, i.e. disable parallelism. "
       "n means use n threads. n must be positive.",

-------------

PR: https://git.openjdk.java.net/jdk/pull/2379


More information about the serviceability-dev mailing list