RFR 8038418 New tests development for type profiling and speculation

Pavel Punegov pavel.punegov at oracle.com
Fri Apr 11 09:14:04 UTC 2014


Hi Roland,

New one: http://cr.openjdk.java.net/~iignatyev/ppunegov/8038418/webrev.05/

Added volatile keyword for the field
Changed compile commands to -XX:CompileCommand=compileonly,scenarios/*::run only, so it doesn't compile executions at all
Removed creating of class loaders as it doesn't needed anymore for executions that made not compileable with CompileCommand

Thanks, Pavel

----- Original Message -----
From: roland.westrelin at oracle.com
To: pavel.punegov at oracle.com
Cc: hotspot-compiler-dev at openjdk.java.net, igor.ignatyev at oracle.com, Ilya.Dergalin at oracle.com
Sent: Friday, April 11, 2014 11:54:49 AM GMT +04:00 Abu Dhabi / Muscat
Subject: Re: RFR 8038418 New tests development for type profiling and speculation

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