RFR(S) : 8129092 : compiler/intrinsics/classcast/NullCheckDroppingsTest.java testVarClassCast() can fail
Igor Ignatyev
igor.ignatyev at oracle.com
Wed Dec 4 01:49:02 UTC 2019
http://cr.openjdk.java.net/~iignatyev//8129092/webrev.01
> 69 lines changed: 38 ins; 2 del; 29 mod;
Hi all,
could you please review the small patch which makes the test more robust by using newly introduced JFR Deoptimization event?
the test used to use WhiteBox.isMethodCompiled to check if there was deoptimization, which, in case uncommon trap's action is none or maybe_recompile (which has been seen), is incorrect. the patch replaces WhiteBox method call w/ asserting JFR events, and check not only that deoptimization happens, but also check its reason is null_check. testing that, I noticed that 'testVarClassCast' doesn't hit uncommon trap due to null_check, but because of unstable_if in the ternary operator at L#180, so I modified the test to pass an instance of Class, which required some small changes.
JBS: https://bugs.openjdk.java.net/browse/JDK-8129092
webrev: http://cr.openjdk.java.net/~iignatyev//8129092/webrev.01
testing: compiler/intrinsics/classcast/NullCheckDroppingsTest.java
Thanks,
-- Igor
More information about the hotspot-compiler-dev
mailing list