RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v18]
Man Cao
manc at openjdk.org
Wed Oct 11 23:54:22 UTC 2023
On Fri, 15 Sep 2023 01:27:04 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Jonathan Joo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Clean up test and improve total counter name
>
> src/hotspot/share/runtime/perfData.hpp line 64:
>
>> 62: COM_THREADS,
>> 63: SUN_THREADS,
>> 64: SUN_THREADS_GCCPU, // Subsystem for Sun Threads GC CPU
>
> Really not sure about this naming ...
+1, dropping the "GC" seems better, i.e. `SUN_THREADS_CPUTIME` and `sun.threads.cpu_time`. For example, `sun.threads.gc_cpu_time.vm` is strange since VM thread also does work unrelated to GC.
For @simonis's point about avoid duplicating the "g1" part in each counter's name, I think it is doable. How about the following list of names?
sun.threads.total_gc_cpu_time // Unchanged. Would sun.threads.cpu_time.gc_total look better?
sun.threads.cpu_time.gc_parallel_workers
sun.threads.cpu_time.gc_conc_mark
sun.threads.cpu_time.gc_conc_refine
sun.threads.cpu_time.vm
sun.threads.cpu_time.conc_dedup
`gc_conc_mark` and `gc_conc_refine` are currently tied to G1. It seems OK because these counters would not exist if G1 is not selected. If other collectors want to implement `gc_conc_mark` in the future, they could implement their own definition of this counter, or move G1's definition to a shared place.
@simonis does the list of names above look good to you?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1355842180
More information about the serviceability-dev
mailing list