Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-28 Thread David Holmes
Thanks Dan! David On 28/05/2020 12:52 pm, Daniel D. Daugherty wrote: I'll wait for your thumbs up on the explanation. I'm good with the explanation. Thanks! Dan On 5/27/20 10:08 PM, David Holmes wrote: Hi Dan, Thanks for taking a look. On 28/05/2020 1:09 am, Daniel D. Daugherty wrote:

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread Daniel D. Daugherty
I'll wait for your thumbs up on the explanation. I'm good with the explanation. Thanks! Dan On 5/27/20 10:08 PM, David Holmes wrote: Hi Dan, Thanks for taking a look. On 28/05/2020 1:09 am, Daniel D. Daugherty wrote: On 5/26/20 12:59 AM, David Holmes wrote: bug:

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread David Holmes
Hi Dan, Thanks for taking a look. On 28/05/2020 1:09 am, Daniel D. Daugherty wrote: On 5/26/20 12:59 AM, David Holmes wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8242504 webrev: http://cr.openjdk.java.net/~dholmes/8242504/webrev/ src/hotspot/os/posix/os_posix.hpp     No comments.

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread Daniel D. Daugherty
On 5/26/20 12:59 AM, David Holmes wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8242504 webrev: http://cr.openjdk.java.net/~dholmes/8242504/webrev/ src/hotspot/os/posix/os_posix.hpp     No comments. src/hotspot/os/posix/os_posix.inline.hpp     No comments.

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread David Holmes
Hi Mark, On 27/05/2020 2:15 am, Mark Kralj-Taylor wrote: David, Thanks for taking this enhancement, and making it work on the older glibc (pre 2.17) Linux platforms currently supported by openjdk. I like that it is a small change to split the JVM startup check on availability of Posix

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread David Holmes
Hi Daniel, Thanks for the review on the API side, and for the detailed consideration of any potential spec issues - of which they are none I'm glad to say. Cheers, David On 27/05/2020 1:35 am, Daniel Fuchs wrote: Hi David, This is not a review for the posix code. Your webrev looks good

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-27 Thread David Holmes
Thanks Roger! David On 27/05/2020 12:28 am, Roger Riggs wrote: Looks good. Thanks to Mark and you for the improvement and testing. On 5/26/20 12:59 AM, David Holmes wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8242504 webrev: http://cr.openjdk.java.net/~dholmes/8242504/webrev/

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Mark Kralj-Taylor
David, Thanks for taking this enhancement, and making it work on the older glibc (pre 2.17) Linux platforms currently supported by openjdk. I like that it is a small change to split the JVM startup check on availability of Posix clock_gettime/getres() APIs and then if additionally CLOCK_MONOTONIC

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Daniel Fuchs
Hi David, This is not a review for the posix code. Your webrev looks good to me and corresponds to what I expected to see. I understand that not all operating systems / platforms are expected to have the nano second precision, so your test probably can't go much beyond what is currently being

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Roger Riggs
Looks good. Thanks to Mark and you for the improvement and testing. On 5/26/20 12:59 AM, David Holmes wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8242504 webrev: http://cr.openjdk.java.net/~dholmes/8242504/webrev/ This work was contributed by Mark Kralj-Taylor:

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Stephen Colebourne
I'm not an official OpenJDK reviewer, nor would I be confident reviewing the native code here. Stephen On Tue, 26 May 2020 at 14:28, David Holmes wrote: > > On 26/05/2020 6:14 pm, Stephen Colebourne wrote: > > AFAICT a nanosecond clock is fine from a java.time.* API perspective. > > Thanks

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread David Holmes
Hi Vyom, Thanks for looking at this. On 26/05/2020 6:44 pm, Vyom Tiwari wrote: Hi David, we can remove the redundant local variable(jlong result) from if block as follows. return jlong(ts.tv_sec) * MILLIUNITS + jlong(ts.tv_nsec) / NANOUNITS_PER_MILLIUNIT; Sure. I copied the code from

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread David Holmes
On 26/05/2020 6:14 pm, Stephen Colebourne wrote: AFAICT a nanosecond clock is fine from a java.time.* API perspective. Thanks Stephen. Is this a review or just a nod of approval? :) Cheers, David - Stephen On Tue, 26 May 2020 at 06:01, David Holmes wrote: bug:

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Vyom Tiwari
Hi David, we can remove the redundant local variable(jlong result) from if block as follows. return jlong(ts.tv_sec) * MILLIUNITS + jlong(ts.tv_nsec) / NANOUNITS_PER_MILLIUNIT; Vyom On Tue, May 26, 2020 at 10:29 AM David Holmes wrote: > bug: https://bugs.openjdk.java.net/browse/JDK-8242504

Re: RFR(S) 8242504: Enhance the system clock to nanosecond precision

2020-05-26 Thread Stephen Colebourne
AFAICT a nanosecond clock is fine from a java.time.* API perspective. Stephen On Tue, 26 May 2020 at 06:01, David Holmes wrote: > > bug: https://bugs.openjdk.java.net/browse/JDK-8242504 > webrev: http://cr.openjdk.java.net/~dholmes/8242504/webrev/ > > This work was contributed by Mark