RFR: 8354811: clock_tics_per_sec code duplication between os_linux and os_posix
Christoph Langer
clanger at openjdk.org
Fri Apr 25 10:48:00 UTC 2025
On Thu, 17 Apr 2025 11:23:28 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> Seems some of the clock_tics_per_sec code can be unified (e.g. in os_posix) between os_linux and os_posix.
src/hotspot/os/linux/os_linux.cpp line 5133:
> 5131: &user_time, &sys_time);
> 5132: if (count != 13) return -1;
> 5133: double clock_tics_factor = 1000000000 / os::Posix::clock_tics_per_second();
I think you should rather not add clock_tics_factor but replace clock_tics_per_sec with os::Posix::clock_tics_per_second() in place, but it's maybe just a matter of taste...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24720#discussion_r2060005385
More information about the hotspot-runtime-dev
mailing list