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

Lin Zang lzang at openjdk.java.net
Thu Feb 11 02:42:45 UTC 2021


On Wed, 10 Feb 2021 22:47:28 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Hi Lin,
>> Sure, let's discuss -histo in this thread first.
>> 
>> Hi @sspitsyn @plummercj @linzang 
>> My following point is based on my humble opinion that parallel=N is not necessary for user and we should use the largest parallel capability of JVM to do heap histo when user intend to do it in parallel. But if you think this basic opinion is not that correct, please kindly ignore following opinion. :-)
>> IMHO, maybe we could make the option simple and automatically speed up heap scan by disabling "parallel=" option and adding "noparallel" at the same time? From user's point of view, "noparallel" will speed up their histo/dump automatically, if they are migrating from jdk15 or prior to jdk15, and also give them a way to fall back to previous serial scan if they would like to do that. Although This way will introduce the compability issue, fortunately JDK16 is not LTS, and maybe we could backport to 16 updates if necessary?
>> How do you think about it? Thanks for discussion.
>> 
>> ( BTW, I might not be able to response timely, as it will be long public holiday the next few days, I'm sorry for the inconvenience. )
>
> I'm in favor of just having a `noparallel` option (default to using parallel) instead of using `parallel=<n>`. This would be for both the histo and heap dump features, and for both the `jmap` and `jcmd` support of these features.
> 
> As for the current `parallel=<n>` support for jmap histo already in JDK 16, hopefully there would be no objections to removing that in JDK 17 in favor of the `noparallel` approach, but I think the CSR for that change should get some good scrutiny. I think it would good to get approval from @AlanBateman and/or @dholmes-ora since they are both in the CSR group and have good serviceability knowledge.
> 
> For reference, the JDK 16 CSR for adding `parallel=<n>` support to `jmap -histo` is [8239290](https://bugs.openjdk.java.net/browse/JDK-8239290), and the bug to change this to a `noparallel` opiton in JDK 17 is [JDK-8261482](https://bugs.openjdk.java.net/browse/JDK-8261482). I don't think there is a CSR yet.

Dear All, 
I took the liberity to create a PR (#2519) for the "noparallel" option. Maybe we could discuss there.  And I also found @Hamlin-Li has created a CSR for that. Thanks a lot!

BRs,
Lin

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

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


More information about the serviceability-dev mailing list