RFR: 8359110: Log accumulated GC and process CPU time upon VM exit [v3]

Jonas Norlinder duke at openjdk.org
Fri Jun 13 16:01:35 UTC 2025


On Fri, 13 Jun 2025 13:04:35 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> I believe it does not exclude ZDirector, etc. Adding `printf("%s\n", thread->name());` to prove my point results in:
>> 
>> 
>> ZDirector
>> ZDriverMajor
>> ZDriverMinor
>> ZStat
>> ZUncommitter#0
>> ZWorkerYoung#0
>> ZWorkerYoung#1
>> ZWorkerYoung#2
>> ZWorkerYoung#3
>> ZWorkerOld#0
>> ZWorkerOld#1
>> ZWorkerOld#2
>> ZWorkerOld#3
>> 
>> 
>> This code is working around the fact that `ZCollectedHeap::gc_threads_do` also calls `_runtime_workers.threads_do` which I believe do not participate in GC related work.
>
> Both Parallel and G1 reuse the same gc-worker threads in `safepoint_workers()` for non-gc work, just fyi.

FWIW; I confirmed with @stefank that `_runtime_workers` shoud not be accounted for GC CPU time for ZGC.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25779#discussion_r2145419752


More information about the hotspot-gc-dev mailing list