RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v32]
Volker Simonis
simonis at openjdk.org
Thu Oct 26 14:34:40 UTC 2023
On Thu, 26 Oct 2023 12:49:21 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Jonathan Joo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use 64-bit atomic add for incrementing counters
>
> src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp line 138:
>
>> 136: _vtime_accum = (os::elapsedVTime() - _vtime_start);
>> 137:
>> 138: cm()->update_concurrent_mark_threads_cpu_time();
>
> Is there some overlapping btw this and the existing `_vtime_accum`. If so, can they be consolidated somehow?
>
> I believe the purpose of calling `update_concurrent_mark_threads_cpu_time` in multiple places is to get more up-to-date conc-cpu-time. Reading through the JBS ticket, I don't see the motivation for maintaining such a "fresh" value.
>
> Finally, is CSR required for this feature?
@albertnetymk, the hsperf counters are a non-public API and the new counters have been added to the non-standard `sun.threads.cpu_time` name space which is "[unstable and unsupported](https://github.com/openjdk/jdk/blob/9864951dceb0ddc4479ced04b6d5a2363f1e307d/src/hotspot/share/runtime/perfData.cpp#L56)" so I don't think a CSR is required.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1373278962
More information about the hotspot-gc-dev
mailing list