RFR: 8214936: assert(_needs_refill == 0) failed: Forgot to handle a failed IC transition requiring IC stubs

Erik Österlund erik.osterlund at oracle.com
Thu Dec 6 13:46:21 UTC 2018


Hi,

In 8214338 I moved IC stub refilling out from IC stub transitions, 
making it the responsibility of the caller. To make sure we don't 
accidentally forget calling IC stub refill and retrying at the call 
site, I added some verification code that complains if the caller failed 
to do so.

I have tracked down that what can happen is that we try to make an IC 
megamorphic, but fail due to requiring IC stubs to do so. In such a 
failure, we try setting the IC to clean, expecting that would also fail, 
due to still not having refilled the buffers yet, but actually succeeding.

As a result of this, the assert fails because we did not refill the IC 
stubs and retry after the transition to megamorphic failed, due to 
subsequently succeeding to clean the IC.

In this patch, I made sure we refill and retry instead as intended. I 
have also improved the verification to use a thread-local verification 
RAII object that makes it easier to not just see that something 
unexpected happened, but also where it happened.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8214936

Webrev:
http://cr.openjdk.java.net/~eosterlund/8214936/webrev.00/

Thanks,
/Erik


More information about the hotspot-compiler-dev mailing list