RFR (S): 8165501: Serial, Parallel and G1 should track the time since last gc for millis_since_last_gc() with full precision

Kim Barrett kim.barrett at oracle.com
Fri Jun 26 13:15:42 UTC 2020


> On Jun 25, 2020, at 7:44 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> I think I caught them all in
> 
> http://cr.openjdk.java.net/~tschatzl/8165501/webrev.1
> 
> no incremental one since almost everything changed anyway, doing another pass at making the code look similar.
> 
> Retested using the mentioned test.
> 
> Thanks,
>  Thomas

Looks okay, so far as it goes.

I have to wonder though, why is millis_since_last_gc a pure virtual?
Indeed, why is it virtual at all? It's not obvious to me why it's not
a relatively simple accessor with an associated (possibly non-public)
update function that is called by each collector with appropriate
values?

I also wonder about the checking for non-monotonic os::javaTimeNanos.
I suspect there are much worse problems than millis_since_last_gc
being wrong if that happens.

Maybe yet more follow-ups in this area?




More information about the hotspot-gc-dev mailing list