RFR 8038418 New tests development for type profiling and speculation
Roland Westrelin
roland.westrelin at oracle.com
Fri Apr 11 07:54:44 UTC 2014
Hi Pavel,
> See new webrev:
> http://cr.openjdk.java.net/~iignatyev/ppunegov/8038418/webrev.03/
>
> I changed all test scenarios to have cases for each of the tested profile
> points, made refactoring, so now scenarios are smaller and easier to read.
Thanks for making the changes.
The problem with this code pattern:
54 case ARGUMENTS:
55 field = obj;
56 if (field != null) {
57 return field.m();
58 }
59 return null;
is that the compiler sees obj was just stored to field and when field is loaded the compiler uses obj directly. Making field volatile would solve that problem. Or you need to store to field outside that method.
Also I think you need to exclude TypeProfile.methodToCompile and TypeConflict.methodToCompile from compilation so that they don’t inline scenario.run() (in which case we loose control of which profiling is used).
> Igor I. helped me to add OffTest.java that runs the same tests but with
> different combinations of -XX:TypeProfiling=XYZ and -XX:+/-TypeSpeculation.
>
> Running this test crashes VM, see the bug:
> https://bugs.openjdk.java.net/browse/JDK-8039975
Thanks for the bug report.
Roland.
More information about the hotspot-compiler-dev
mailing list