RFR: 8274051: Remove supports_vtime()/elapsedVTime() [v3]
Ivan Walulya
iwalulya at openjdk.org
Mon Jun 30 11:09:41 UTC 2025
On Fri, 27 Jun 2025 09:48:06 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Hi all,
>>
>> please review this change that removes the `*vtime()` methods from G1, replacing them with the appropriate `os::thread_cpu_time()` calls. They completely supersede the former ones.
>>
>> Further I made support for `os::thread_cpu_time()` mandatory for G1, it will fail if not available. All platforms implement them, only non-OSX *BSD do not in mainline sources. However in the [official fork](https://github.com/freebsd/openjdk/blob/jdk24u-freebsd/src/hotspot/os/bsd/os_bsd.cpp#L2609) it already does.
>>
>> There are upstreaming efforts underway too, so I do not see this as blocker for this behavior.
>>
>> One other change is that the various getters directly use the time returned by the OS function as cpu time, only counting the main work (marking steps, actual refinement) as used cpu time. I do not think this is honest to discount random cpu time spent in other work these threads must do (like getting to and leaving the main work described above).
>>
>> There has been some effort to make naming a bit more consistent: cpu times were all named with `_cpu_time` with all non-standard units that unit appended (`_s`for seconds and so on).
>>
>> Testing: tier1-3
>>
>> Thanks,
>> Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>
> * more kbarrett review
LGTM!
-------------
Marked as reviewed by iwalulya (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26001#pullrequestreview-2970822285
More information about the hotspot-gc-dev
mailing list