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

Jonas Norlinder duke at openjdk.org
Thu Jul 3 08:59:49 UTC 2025


On Thu, 3 Jul 2025 08:09:35 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Jonas Norlinder has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 27 commits:
>> 
>>  - Move call to print_tracing_info
>>  - Merge branch 'master' into gc_cpu_time
>>  - Remove static and move string_dedup_cpu_time into elapsed_gc_cpu_time
>>  - Fixes after @albertnetymk review
>>  - Change output per discussion
>>  - Make stop protected, remove integer divison, remove unused method
>>  - Update closure name
>>  - vtime -> cpu_time and _vm_vtime -> _vmthread_cpu_time
>>  - Fixes after review from @stefank
>>  - Merge branch 'master' of github.com:JonasNorlinder/openjdk_jdk into gc_cpu_time
>>  - ... and 17 more: https://git.openjdk.org/jdk/compare/c75df634...f9c3aa64
>
> src/hotspot/share/gc/shared/cpuTimeScope.inline.hpp line 57:
> 
>> 55:   if (UsePerfData) {
>> 56:     CPUTimeCounters::get_instance()->update_counter(CPUTimeGroups::CPUTimeType::vm, end);
>> 57:   }
> 
> This class (name/interface) seems fairly generic, but the underlying impl is tightly coupled to vmthread. IOW, one can't use this class other than on vmthread. Maybe this class should be inside vmThread.cpp.

Good point. I think the class mostly belong in shared/gc so I will rename it to something more specific.

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

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


More information about the hotspot-gc-dev mailing list