RFR: JDK-8273979: move some os time related functions to os_posix for POSIX platforms
David Holmes
dholmes at openjdk.java.net
Tue Sep 21 06:18:56 UTC 2021
On Mon, 20 Sep 2021 13:16:42 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
Hi Matthias,
Generally this refactoring looks good, though I have a request to restore some of the code - see comments below. Also could you clarify where functions were only "pretty similar" rather than identical as we don't want to introduce subtle incompatibilities.
I think supports_vtime() could probably be removed in a separate RFE.
Thanks,
David
src/hotspot/os/aix/os_aix.cpp line 997:
> 995: }
> 996:
> 997: void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) {
Please restore this. As has been discussed in previous refactorings in this code if there is a platform specific definition of javaTimeNanos then we should keep the platform specific definition of javaTimeNanos_info, even if it happens to be the same as on other platforms. Otherwise if the javaTimeNanos code were changed one would not realise they also may have to change javaTimenanos_info.
src/hotspot/os/bsd/os_bsd.cpp line 808:
> 806: }
> 807:
> 808: void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) {
Please restore as per previous comment.
src/hotspot/os/posix/os_posix.cpp line 98:
> 96: #else
> 97: static int clock_tics_per_sec = 100;
> 98: #endif
Can't we just defer the conditional initialization to the init() function where we already have to conditionally initialise.
-------------
Changes requested by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5582
More information about the hotspot-runtime-dev
mailing list