# HG changeset patch # User Gilles Duboscq # Date 1376656288 -7200 # Node ID 33ea8e2addac2bf9609f8854c39ddba895f3c9b5 # Parent dbcdae5ae7413690fb9522ebde3e07a151f3b1a7 Fix GraalCompilerTest deopt checks: need to re-aquire the profile after running the method since the MethodData may not be present before running it. More precise comment for ProfileInfo.getNullSeen diff -r dbcdae5ae741 -r 33ea8e2addac graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ProfilingInfo.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ProfilingInfo.java Fri Aug 16 13:28:30 2013 +0200 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ProfilingInfo.java Fri Aug 16 14:31:28 2013 +0200 @@ -87,7 +87,8 @@ TriState getExceptionSeen(int bci); /** - * Returns information if null was ever seen for the given BCI. + * Returns information if null was ever seen for the given BCI. This information is collected + * for the aastore, checkcast and instanceof bytecodes. * * @return {@link TriState#TRUE} if null was seen for the instruction, {@link TriState#FALSE} if * null was NOT seen, and {@link TriState#UNKNOWN} if this information was not recorded. diff -r dbcdae5ae741 -r 33ea8e2addac graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Fri Aug 16 13:28:30 2013 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Fri Aug 16 14:31:28 2013 +0200 @@ -363,11 +363,13 @@ protected Result executeActualCheckDeopt(Method method, Set shouldNotDeopt, Object receiver, Object... args) { Map deoptCounts = new EnumMap<>(DeoptimizationReason.class); - ProfilingInfo profile = runtime.lookupJavaMethod(method).getProfilingInfo(); + ResolvedJavaMethod javaMethod = runtime.lookupJavaMethod(method); + ProfilingInfo profile = javaMethod.getProfilingInfo(); for (DeoptimizationReason reason : shouldNotDeopt) { deoptCounts.put(reason, profile.getDeoptimizationCount(reason)); } Result actual = executeActual(method, receiver, args); + profile = javaMethod.getProfilingInfo(); // profile can change after execution for (DeoptimizationReason reason : shouldNotDeopt) { Assert.assertEquals((int) deoptCounts.get(reason), profile.getDeoptimizationCount(reason)); }