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

Jonas Norlinder duke at openjdk.org
Wed Jul 2 16:35:45 UTC 2025


On Wed, 2 Jul 2025 11:22:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Change output per discussion
>
> src/hotspot/share/gc/shared/collectedHeap.cpp line 630:
> 
>> 628:     double process_cpu_time = os::elapsed_process_cpu_time();
>> 629:     double gc_cpu_time = elapsed_gc_cpu_time();
>> 630:     double string_dedup_cpu_time = UseStringDeduplication ? (double)os::thread_cpu_time((Thread*)StringDedup::_processor->_thread) / NANOSECS_PER_SEC : 0;
> 
> If we consider stringdedup as gc-time, should this line be inlined to `elapsed_gc_cpu_time`?

I'd prefer not to, as it is strictly not GC-time and we may want to use these methods in other places in the future.

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

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


More information about the hotspot-gc-dev mailing list