RFR(14u): 8237375: SimpleThresholdPolicy misses CounterDecay timestamp initialization

Volker Simonis volker.simonis at gmail.com
Fri Feb 7 11:31:01 UTC 2020


Looks good except that I'd rather use:

+    return ((os::javaTimeNanos() - _last_timestamp) /
NANOUNITS_PER_MILLIUNIT) > CounterDecayMinIntervalLength;

instead of:

+    return ((os::javaTimeNanos() - _last_timestamp) / NANOUNITS *
MILLIUNITS) > CounterDecayMinIntervalLength;

because it looks clearer (and is exactly what nanos_to_millis() also does).

On Fri, Feb 7, 2020 at 3:12 AM Langer, Christoph
<christoph.langer at sap.com> wrote:
>
> Hi,
>
> please help reviewing the backport of the following change to jdk14u:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8237375
> Original change: https://hg.openjdk.java.net/jdk/jdk/rev/2a0e2304e68b
> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8237375.14u/
>
> The original change would not apply due to its predecessor "8235741: Inappropriate uses of os::javaTimeMillis()" which isn't backported. I had to do some context shifting and replace usage of method nanos_to_millis, since this was only introduced with 8235741.
>
> Thanks
> Christoph
>


More information about the jdk-updates-dev mailing list