RFR: JDK-8261034: improve jcmd GC.class_histogram to support parallel [v3]
Hamlin Li
mli at openjdk.java.net
Thu Feb 4 07:28:04 UTC 2021
On Wed, 3 Feb 2021 21:28:40 GMT, Chris Plummer <cjplummer at openjdk.org> 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
>
> src/hotspot/share/services/diagnosticCommand.cpp line 559:
>
>> 557: "BOOLEAN", false, "false"),
>> 558: _parallel_thread_num("-parallel", "parallel threads number for heap iteration",
>> 559: "INT", false, "0") {
>
> Does "0" mean use a default number of parallel threads as it does for the jmap? It's unclear, but it seems that it doesn't, which I think leads to eventually hitting this assert in `update_active_workers(uint v)`:
> assert(v != 0, "Trying to set active workers to 0");
> If that's not the case, please explain how 0 is handled. In any case, I think it should be made consistent with jmap and should also be documented in the above help output:
> parallel=<count> generate histogram using this many parallel threads, default 0
> 0 use system determined number of threads
> 1 use one thread, i.e., disable parallelism
> n use n threads, n must be positive
Thanks Chris for reviewing, I have updated the patch as you suggested, would you mind to have another look at it?
CSR is created at https://bugs.openjdk.java.net/browse/JDK-8261105
-------------
PR: https://git.openjdk.java.net/jdk/pull/2379
More information about the hotspot-runtime-dev
mailing list