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

Man Cao manc at openjdk.org
Tue Nov 7 01:08:33 UTC 2023


On Mon, 6 Nov 2023 12:11:47 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

> I played around a bit instead of trying to explain what I mean and this is not very polished, but I was thinking something like this: https://github.com/openjdk/jdk/compare/pr/15082...kstefanj:jdk:pull/15082-idea
>
> What do you think? This way we don't add things to CollectedHeap as well, which is usually good unless really needed.

I think it looks great. It is mainly refactoring that consolidates the declarations/definitions of the hsperf counters in to a single file. Would it be better to name that class `CPUTimeCounters`, so we could move `sun.threads.cpu_time.vm` and `sun.threads.cpu_time.conc_dedup`, and future JIT thread CPU counters to that class?

Then we could also change the constructor of `ThreadTotalCPUTimeClosure` to `ThreadTotalCPUTimeClosure(CPUTimeCounters* counters, CPUTimeGroups::Name name)`, then it could set `_update_gc_counters` based on `name`.

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

PR Comment: https://git.openjdk.org/jdk/pull/15082#issuecomment-1797109487


More information about the serviceability-dev mailing list