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

Thomas Schatzl tschatzl at openjdk.org
Tue Jul 1 09:10:45 UTC 2025


On Tue, 1 Jul 2025 07:45:58 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Jonas Norlinder has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Update closure name
>>  - vtime -> cpu_time and _vm_vtime -> _vmthread_cpu_time
>
> src/hotspot/os/posix/os_posix.cpp line 1603:
> 
>> 1601: }
>> 1602: 
>> 1603: double os::elapsed_process_cpu_time() {
> 
> I am kind of conflicted about returning a rounded value (`double`) in that method. There does not seem to be a good reason to not just return the `ns` (integer) value and only do the rounding when presenting the value.
> 
> Sorry for not noticing earlier, it's just that recently I did that other change in that area, and the unnecessary effort (and rounding) has been an issue there as well.

Another thought I had was whether the `elapsed` prefix is actually necessary - all cpu times are since thread/process start.

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

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


More information about the hotspot-gc-dev mailing list