Hi Vyom,

Thank you for fixing this!

In addition to Rogers remarks:

aix_close.c:
Could you please also update the SAP copyright?

style nit:
+            //nanoTimeout has to be >= 1 millisecond to iterate again.
I thought we use old C style comments? Could you please leave a space
between comment and text?

net_util.h: It could be more readable if you used the "1000 * 1000..."
notation to define the constants.

--

Apart from this, I have some small reservations about JVM_NanoTime: I see
that JVM_NanoTime is defined using the JVM_LEAF macro. I am not sure why
this is necessary. It has a number of disadvantages:

- we need to hand in JVMEnv*, which is not necessary for the time
measurement itself (which is a simple os::javaTimeNanos() call). This
requires us to funnel the JVMEnv* thru to NET_Timeout, which makes the
caller code more complicated.

- JVM_LEAF does a number of verifications in the debug VM, which is not
ideal for a time measure function

- Also, it blocks on VM exit. Probably not a problem, but a cause for
potential problems.

os::javaTimeNanos is a simple time measuring function which does not depend
on any internal VM state, as far as I see... so, I do not think it is
necessary to wrap it with JVM_LEAF, no?

Kind Regards, Thomas


On Tue, Apr 11, 2017 at 3:04 PM, Vyom Tewari <vyom.tew...@oracle.com> wrote:

> Hi,
>
> Please review the code change for below issue.
>
> Bug:       https://bugs.openjdk.java.net/browse/JDK-8165437
>
> Webrev: http://cr.openjdk.java.net/~vtewari/8165437/webrev0.5/index.html
>
> This change will replace the "gettimeofday" to use the monotonic
> increasing clock(i used the existing function "JVM_NanoTime" instead of
> writing my own).
>
> Thanks,
>
> Vyom
>
>
>

Reply via email to