RFR: 8359348: G1: Improve cpu usage measurements for heap sizing [v2]

Ivan Walulya iwalulya at openjdk.org
Thu Jul 17 12:38:58 UTC 2025


On Thu, 17 Jul 2025 10:06:22 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Ivan Walulya has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>> 
>>  - Merge branch 'NormalizeTiming' into ConcCPUImpact
>>  - Thomas suggestion
>>  - Thomas Review
>>  - reorder
>>  - concurrent gc impact
>>  - clean out
>>  - init
>
> src/hotspot/share/gc/g1/g1Analytics.cpp line 174:
> 
>> 172:   // caches, therefore underestimate the impact of the concurrent GC activity on mutator threads.
>> 173:   uint num_cpus = (uint)os::active_processor_count();
>> 174:   num_cpus = MIN2(num_cpus, MAX2(ConcGCThreads, ParallelGCThreads));
> 
> Why the use of `ParallelGCThreads`? I thought parallel-threads are used only for stw-work but the current context about concurrent-work.

`G1ConcRefinementThreads` and `ConcGCThreads` are by default bounded by  ParallelGCThreads, but maybe we can use `G1ConcRefinementThreads` directly here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26351#discussion_r2213222502


More information about the hotspot-gc-dev mailing list