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

Langer, Christoph christoph.langer at sap.com
Fri Feb 7 12:46:38 UTC 2020


Hi Volker,

thanks for having a look here.

> 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).

You're right and I would have done that - but unfortunately NANOUNITS_PER_MILLIUNIT was only introduced with 8235741 and I don't want to pull this into my backport here.

So, is the change for 11u also ok?

Thanks
Christoph



More information about the jdk-updates-dev mailing list