RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2]
Lutz Schmidt
lucy at openjdk.java.net
Wed Sep 22 07:59:04 UTC 2021
On Tue, 21 Sep 2021 07:01:20 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> There are a couple of time related functions in os_<platform> for Linux, BSD+Mac and AIX that are pretty similar (or identical) across the platforms and can be centralized in os_posix .
>> While doing so, I noticed that os::supports_vtime() returns always true , on Posix and also on Windows, so we might remove it completely if this prefered ?
>>
>> Best regards , Matthias
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Restored javaTimeNanos_info in os-files, adjusted clock_tics_per_sec init
Changes requested by lucy (Reviewer).
src/hotspot/os/linux/os_linux.cpp line 175:
> 173:
> 174: static int clock_tics_per_sec = 100;
> 175:
In os_linux.cpp, clock_tics_per_sec is used for elapsed time calculations as well as for cpu time calculations. In addition, clock_tics_per_sec is set (reinitialised) in os::init(). Are we sure that _SC_CLK_TCK evaluates to 100? If no, do we then potentially calculate wrong elapsed times after moving the code to os_posix?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5582
More information about the hotspot-runtime-dev
mailing list