RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms [v2]

Matthias Baesken mbaesken at openjdk.java.net
Tue Sep 21 07:46:52 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

Hi David, I brought back os::javaTimeNanos_info  following your suggestion and adjusted the initialization of  'clock_tics_per_sec ' in os_posix.

>Also could you clarify where functions were only "pretty similar" rather than identical as we don't want to introduce subtle incompatibilities


Sure, went through them and this is what I found
os::elapsedTime()      identical except comment
os::elapsed_counter()   identical
os::elapsed_frequency() identical
os::supports_vtime()          identical
os::getTimesSecs         identical
os::local_time_string  identical
os::localtime_pd   identical

>I think supports_vtime() could probably be removed in a separate RFE.

OK, I opened https://bugs.openjdk.java.net/browse/JDK-8274051  .

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

PR: https://git.openjdk.java.net/jdk/pull/5582


More information about the hotspot-runtime-dev mailing list