On Thu, 4 Feb 2021 23:08:21 GMT, Chris Plummer <[email protected]> wrote:

>> 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.

sure, just added some test cases for invalid args, and also added test 
condition in production to return if parallel < 0.

> 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.",

Thanks for detailed review, Chris, just modified as you suggested.

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

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

Reply via email to