RFR(S) : 8129092 : compiler/intrinsics/classcast/NullCheckDroppingsTest.java testVarClassCast() can fail

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Dec 4 02:41:23 UTC 2019


LGTM

Thanks,
Vladimir K

On 12/3/19 5:49 PM, Igor Ignatyev wrote:
> 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