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

Jonas Norlinder duke at openjdk.org
Fri Jun 13 12:02:40 UTC 2025


On Thu, 12 Jun 2025 16:21:12 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Jonas Norlinder has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Refactor shared logic into CollectedHeap, remove nominal logging and cost->usage
>>  - Remove unnecessary assert
>
> src/hotspot/share/runtime/vmThread.cpp line 282:
> 
>> 280: 
>> 281:     EventExecuteVMOperation event;
>> 282:     VTimeScope vTimeScope(this);
> 
> Not sure if it is the intent of this change to put all VM operations into the "GC" bucket, particularly because of the log message indicating so. I would prefer if really only GC operations would be counted here; `VTimeScope` does not use `operation_is_gc()` either, so I am not sure about the intention here.

Ouch, thanks for catching this! My intention to use `operation_is_gc()` got lost during code refactoring. `VTimeScope` are supposed to call `os::thread_cpu_time` minimum amount of times needed and update VM cpu time tracking used by hsperf counters and the CPU time tracking this patch adds for GC.

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

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


More information about the hotspot-gc-dev mailing list