RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v32]

Albert Mingkun Yang ayang at openjdk.org
Thu Oct 26 12:52:42 UTC 2023


On Wed, 25 Oct 2023 20:37:46 GMT, Jonathan Joo <jjoo at openjdk.org> wrote:

>> 8315149: Add hsperf counters for CPU time of internal GC threads
>
> 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?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1373116720


More information about the serviceability-dev mailing list