RFR 8038418 New tests development for type profiling and speculation
Roland Westrelin
roland.westrelin at oracle.com
Wed Apr 9 09:52:54 UTC 2014
Hi Pavel,
> Webrev: http://cr.openjdk.java.net/~iignatyev/ppunegov/8038418/webrev.01/
As I understand, with that code:
67 public Integer run(T obj) {
68 if (isReturnType) {
69 obj = collectReturnType(obj);
70 }
71 return inlinee(obj);
72 }
it is expected that the compiler has profiling for incoming parameters to run(), return from collectReturnType(), arguments at call to inlinee().
Because, it knowns from the parameter the profiled type of obj, the compiler doesn’t use return value profiling or argument profiling. So I don’t think the tests exercise arguments/return value profiling. One way to test each one would be to run with different values of TypeProfileLevel (200, 020, 002) or the scenarios/tests would need to be changed so that you can pollute parameter profiling + return value profiling but not argument profiling etc.
Also with this:
68 if (isReturnType) {
69 obj = collectReturnType(obj);
70 }
return value profiling is only valid within the if() so it can’t be used be the compiler. Something like this:
if (isReturnType) {
obj = collectReturnType(obj);
return inlinee(obj);
}
return inlinee(obj);
is better.
Roland.
More information about the hotspot-compiler-dev
mailing list