changeset 18718:305e6a73117d

Merge
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Thu, 18 Dec 2014 15:23:08 +0100
parents 2206dae9a802 (current diff) d1826470d1ec (diff)
children 6484e5c068c7
files
diffstat 13 files changed, 179 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LocationMarker.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LocationMarker.java	Thu Dec 18 15:23:08 2014 +0100
@@ -41,7 +41,7 @@
     public static class Options {
         // @formatter:off
         @Option(help = "Use decoupled pass for location marking (instead of using LSRA marking)", type = OptionType.Debug)
-        public static final OptionValue<Boolean> UseLocationMarker = new OptionValue<>(false);
+        public static final OptionValue<Boolean> UseLocationMarker = new OptionValue<>(true);
         // @formatter:on
     }
 
@@ -188,11 +188,14 @@
             if (shouldProcessValue(operand)) {
                 Debug.log("clear operand: %s", operand);
                 frameMap.clearReference(operand, currentSet);
+            } else {
+                assert isIllegal(operand) || operand.getPlatformKind() != Kind.Illegal || mode == OperandMode.TEMP : String.format("Illegal PlatformKind is only allowed for TEMP mode: %s, %s",
+                                operand, mode);
             }
         }
 
         protected boolean shouldProcessValue(Value operand) {
-            return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && operand.getKind() != Kind.Illegal;
+            return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && operand.getPlatformKind() != Kind.Illegal;
         }
     }
 
--- a/graal/com.oracle.graal.hotspot.sourcegen/src/com/oracle/graal/hotspot/sourcegen/GenGraalRuntimeInlineHpp.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.sourcegen/src/com/oracle/graal/hotspot/sourcegen/GenGraalRuntimeInlineHpp.java	Thu Dec 18 15:23:08 2014 +0100
@@ -34,7 +34,22 @@
 import com.oracle.graal.options.*;
 
 /**
- * Command line utility for generating the source code of {@code GraalRuntime.inline.hpp}.
+ * Command line utility for generating the source code of {@code graalRuntime.inline.hpp}. The
+ * generated code is comprised of:
+ * <ul>
+ * <li>{@code -G} command line option parsing {@linkplain #genSetOption(PrintStream) helper}</li>
+ * <li>{@link Service} loading {@linkplain #genGetServiceImpls(PrintStream) helper}</li>
+ * </ul>
+ *
+ * The purpose of the generated code is to avoid executing Graal related Java code as much as
+ * possible during initialization of the Graal runtime. Future solutions such as some kind of AOT
+ * system may make such a mechanism redundant in terms of minimizing Graal's impact on VM startup
+ * time.
+ *
+ * The input for the generation is all classes that implement {@link Service} or contain fields
+ * annotated by {@link Option}. As such, the code generation process must be executed with a class
+ * path including all Graal jars that contains such classes. Currently, this is
+ * {@code graal-truffle.jar}.
  */
 public class GenGraalRuntimeInlineHpp {
 
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java	Thu Dec 18 15:23:08 2014 +0100
@@ -94,7 +94,7 @@
 
     private static void setOop(BitSet map, int startIdx, LIRKind kind) {
         int length = kind.getPlatformKind().getVectorLength();
-        map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length) - 1);
+        map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length));
         for (int i = 0, idx = BITS_PER_WORD * startIdx; i < length; i++, idx += BITS_PER_WORD) {
             if (kind.isReference(i)) {
                 map.set(idx);
@@ -105,7 +105,7 @@
     private static void setNarrowOop(BitSet map, int idx, LIRKind kind) {
         int length = kind.getPlatformKind().getVectorLength();
         int nextIdx = idx + (length + 1) / 2;
-        map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx - 1);
+        map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx);
         for (int i = 0, regIdx = BITS_PER_WORD * idx; i < length; i += 2, regIdx += BITS_PER_WORD) {
             if (kind.isReference(i)) {
                 map.set(regIdx);
@@ -179,13 +179,13 @@
 
     private static void clearOop(BitSet map, int startIdx, LIRKind kind) {
         int length = kind.getPlatformKind().getVectorLength();
-        map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length) - 1);
+        map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length));
     }
 
     private static void clearNarrowOop(BitSet map, int idx, LIRKind kind) {
         int length = kind.getPlatformKind().getVectorLength();
         int nextIdx = idx + (length + 1) / 2;
-        map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx - 1);
+        map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx);
     }
 
     public void clearRegister(int idx, LIRKind kind) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ClassGetHubNode.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ClassGetHubNode.java	Thu Dec 18 15:23:08 2014 +0100
@@ -25,6 +25,7 @@
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.*;
 
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.compiler.common.calc.*;
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.spi.*;
 import com.oracle.graal.hotspot.*;
@@ -34,6 +35,7 @@
 import com.oracle.graal.nodeinfo.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.HeapAccess.BarrierType;
+import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
 
@@ -44,7 +46,7 @@
  * {@link ReadNode#canonicalizeRead(ValueNode, LocationNode, ValueNode, CanonicalizerTool)}.
  */
 @NodeInfo
-public class ClassGetHubNode extends FloatingGuardedNode implements Lowerable, Canonicalizable {
+public class ClassGetHubNode extends FloatingGuardedNode implements Lowerable, Canonicalizable, ConvertNode {
     @Input protected ValueNode clazz;
     protected final HotSpotGraalRuntimeProvider runtime;
 
@@ -110,4 +112,36 @@
     @NodeIntrinsic
     public static native KlassPointer readClass(Class<?> clazz, GuardingNode guard);
 
+    public ValueNode getValue() {
+        return clazz;
+    }
+
+    public Constant convert(Constant c) {
+        ResolvedJavaType exactType = runtime.getHostProviders().getConstantReflection().asJavaType(c);
+        if (exactType instanceof HotSpotResolvedObjectType) {
+            HotSpotResolvedObjectType objectType = (HotSpotResolvedObjectType) exactType;
+            return objectType.getObjectHub();
+        } else {
+            assert exactType instanceof HotSpotResolvedPrimitiveType;
+            return JavaConstant.NULL_POINTER;
+        }
+    }
+
+    public Constant reverse(Constant c) {
+        assert !c.equals(JavaConstant.NULL_POINTER);
+        ResolvedJavaType objectType = runtime.getHostProviders().getConstantReflection().asJavaType(c);
+        return objectType.getJavaClass();
+    }
+
+    public boolean isLossless() {
+        return false;
+    }
+
+    @Override
+    public boolean preservesOrder(Condition op, Constant value) {
+        assert op == Condition.EQ || op == Condition.NE;
+        ResolvedJavaType exactType = runtime.getHostProviders().getConstantReflection().asJavaType(value);
+        return exactType instanceof HotSpotResolvedObjectType;
+    }
+
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HubGetClassNode.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HubGetClassNode.java	Thu Dec 18 15:23:08 2014 +0100
@@ -29,10 +29,12 @@
 import com.oracle.graal.graph.*;
 import com.oracle.graal.graph.spi.*;
 import com.oracle.graal.hotspot.*;
+import com.oracle.graal.hotspot.meta.*;
 import com.oracle.graal.hotspot.word.*;
 import com.oracle.graal.nodeinfo.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.nodes.HeapAccess.BarrierType;
+import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.nodes.spi.*;
 
@@ -41,18 +43,18 @@
  * also used by {@link ClassGetHubNode} to eliminate chains of {@code klass._java_mirror._klass}.
  */
 @NodeInfo
-public class HubGetClassNode extends FloatingGuardedNode implements Lowerable, Canonicalizable {
+public class HubGetClassNode extends FloatingGuardedNode implements Lowerable, Canonicalizable, ConvertNode {
     @Input protected ValueNode hub;
-    protected final HotSpotVMConfig config;
+    protected final HotSpotGraalRuntimeProvider runtime;
 
-    public static HubGetClassNode create(@InjectedNodeParameter MetaAccessProvider metaAccess, @InjectedNodeParameter HotSpotVMConfig config, ValueNode hub) {
-        return new HubGetClassNode(hub, metaAccess, config);
+    public static HubGetClassNode create(@InjectedNodeParameter MetaAccessProvider metaAccess, @InjectedNodeParameter HotSpotGraalRuntimeProvider runtime, ValueNode hub) {
+        return new HubGetClassNode(hub, metaAccess, runtime);
     }
 
-    protected HubGetClassNode(ValueNode hub, MetaAccessProvider metaAccess, HotSpotVMConfig config) {
+    protected HubGetClassNode(ValueNode hub, MetaAccessProvider metaAccess, HotSpotGraalRuntimeProvider runtime) {
         super(StampFactory.declaredNonNull(metaAccess.lookupJavaType(Class.class)), null);
         this.hub = hub;
-        this.config = config;
+        this.runtime = runtime;
     }
 
     public ValueNode getHub() {
@@ -81,7 +83,7 @@
             return;
         }
 
-        LocationNode location = ConstantLocationNode.create(CLASS_MIRROR_LOCATION, config.classMirrorOffset, graph());
+        LocationNode location = ConstantLocationNode.create(CLASS_MIRROR_LOCATION, runtime.getConfig().classMirrorOffset, graph());
         assert !hub.isConstant();
         FloatingReadNode read = graph().unique(FloatingReadNode.create(hub, location, null, stamp(), getGuard(), BarrierType.NONE));
         graph().replaceFloating(this, read);
@@ -90,4 +92,38 @@
     @NodeIntrinsic
     public static native Class<?> readClass(KlassPointer hub);
 
+    @Override
+    public ValueNode getValue() {
+        return hub;
+    }
+
+    @Override
+    public Constant convert(Constant c) {
+        if (JavaConstant.NULL_POINTER.equals(c)) {
+            return c;
+        }
+        return runtime.getHostProviders().getConstantReflection().asJavaType(c).getJavaClass();
+    }
+
+    @Override
+    public Constant reverse(Constant c) {
+        if (JavaConstant.NULL_POINTER.equals(c)) {
+            return c;
+        }
+        ResolvedJavaType type = runtime.getHostProviders().getConstantReflection().asJavaType(c);
+        if (type instanceof HotSpotResolvedObjectType) {
+            return ((HotSpotResolvedObjectType) type).getObjectHub();
+        } else {
+            assert type instanceof HotSpotResolvedPrimitiveType;
+            return JavaConstant.NULL_POINTER;
+        }
+    }
+
+    @Override
+    public boolean isLossless() {
+        /*
+         * Any concrete Klass* has a corresponding java.lang.Class
+         */
+        return true;
+    }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java	Thu Dec 18 15:23:08 2014 +0100
@@ -137,7 +137,7 @@
     }
 
     private ConstantNode canonicalConvertConstant(CanonicalizerTool tool, ConvertNode convert, Constant constant) {
-        if (convert.preservesOrder(condition())) {
+        if (convert.preservesOrder(condition(), constant)) {
             Constant reverseConverted = convert.reverse(constant);
             if (convert.convert(reverseConverted).equals(constant)) {
                 return ConstantNode.forConstant(convert.getValue().stamp(), reverseConverted, tool.getMetaAccess());
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java	Thu Dec 18 15:23:08 2014 +0100
@@ -56,5 +56,16 @@
         return isLossless();
     }
 
+    /**
+     * Check whether a conversion preserves comparison order against a particular constant value.
+     *
+     * @param op a comparison operator
+     * @param value
+     * @return true iff (c1 op value) == (convert(c1) op convert(value)) for value and all c1
+     */
+    default boolean preservesOrder(Condition op, Constant value) {
+        return preservesOrder(op);
+    }
+
     ValueNode asNode();
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java	Thu Dec 18 15:23:08 2014 +0100
@@ -23,6 +23,7 @@
 package com.oracle.graal.nodes.calc;
 
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.compiler.common.*;
 import com.oracle.graal.compiler.common.type.*;
 import com.oracle.graal.nodeinfo.*;
 import com.oracle.graal.nodes.*;
@@ -84,7 +85,7 @@
                 /*
                  * One of the two objects has identity, the other doesn't. In code, this looks like
                  * "Integer.valueOf(a) == new Integer(b)", which is always false.
-                 * 
+                 *
                  * In other words: an object created via valueOf can never be equal to one created
                  * by new in the same compilation unit.
                  */
@@ -111,6 +112,11 @@
 
     @Override
     protected CompareNode duplicateModified(ValueNode newX, ValueNode newY) {
-        return ObjectEqualsNode.create(newX, newY);
+        if (newX.stamp() instanceof ObjectStamp && newY.stamp() instanceof ObjectStamp) {
+            return ObjectEqualsNode.create(newX, newY);
+        } else if (newX.stamp() instanceof AbstractPointerStamp && newY.stamp() instanceof AbstractPointerStamp) {
+            return PointerEqualsNode.create(newX, newY);
+        }
+        throw GraalInternalError.shouldNotReachHere();
     }
 }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Wed Dec 17 16:50:38 2014 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Thu Dec 18 15:23:08 2014 +0100
@@ -35,6 +35,7 @@
 import com.oracle.graal.debug.Debug.Scope;
 import com.oracle.graal.debug.internal.*;
 import com.oracle.graal.graph.*;
+import com.oracle.graal.graph.Graph.Mark;
 import com.oracle.graal.graph.Node;
 import com.oracle.graal.loop.*;
 import com.oracle.graal.nodes.CallTargetNode.InvokeKind;
@@ -229,19 +230,26 @@
         ResolvedJavaType profileClass = metaAccess.lookupJavaType(NodeCloneable.class);
         do {
             changedInIteration = false;
-            for (MethodCallTargetNode methodCallTargetNode : graph.getNodes(MethodCallTargetNode.class)) {
-                InvokeKind kind = methodCallTargetNode.invokeKind();
-                if (kind == InvokeKind.Static || kind == InvokeKind.Special) {
-                    ValueNode receiver = methodCallTargetNode.receiver();
-                    if (receiver != null && receiver.isConstant() && profileClass.isAssignableFrom(receiver.stamp().javaType(metaAccess))) {
-                        queue.addFirst(methodCallTargetNode);
-                    } else {
-                        queue.addLast(methodCallTargetNode);
+
+            Mark mark = null;
+            while (true) {
+
+                for (MethodCallTargetNode methodCallTargetNode : graph.getNewNodes(mark).filter(MethodCallTargetNode.class)) {
+                    InvokeKind kind = methodCallTargetNode.invokeKind();
+                    if (kind == InvokeKind.Static || kind == InvokeKind.Special) {
+                        ValueNode receiver = methodCallTargetNode.receiver();
+                        if (receiver != null && receiver.isConstant() && profileClass.isAssignableFrom(receiver.stamp().javaType(metaAccess))) {
+                            queue.addFirst(methodCallTargetNode);
+                        } else {
+                            queue.addLast(methodCallTargetNode);
+                        }
                     }
                 }
-            }
+                mark = graph.getMark();
 
-            while (!queue.isEmpty()) {
+                if (queue.isEmpty()) {
+                    break;
+                }
                 MethodCallTargetNode methodCallTargetNode = queue.removeFirst();
                 if (!methodCallTargetNode.isAlive()) {
                     continue;
--- a/mx/mx_graal.py	Wed Dec 17 16:50:38 2014 +0100
+++ b/mx/mx_graal.py	Thu Dec 18 15:23:08 2014 +0100
@@ -548,17 +548,24 @@
         mx.update_file(graalRuntime_inline_hpp, tmp.getvalue())
 
         # Store SHA1 in generated Java class and append class to specified jar
+        javaPackageName = 'com.oracle.graal.hotspot.sourcegen'
+        javaClassName = javaPackageName + '.GeneratedSourcesSha1'
         javaSource = join(_graal_home, 'GeneratedSourcesSha1.java')
-        javaClass = join(_graal_home, 'GeneratedSourcesSha1.class')
+        javaClass = join(_graal_home, javaClassName.replace('.', os.path.sep) + '.class')
         with open(javaSource, 'w') as fp:
+            print >> fp, 'package ' + javaPackageName + ';'
             print >> fp, 'class GeneratedSourcesSha1 { private static final String value = "' + sha1 + '"; }'
         subprocess.check_call([mx.java().javac, '-d', mx._cygpathU2W(_graal_home), mx._cygpathU2W(javaSource)], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
         zf = zipfile.ZipFile(dist.path, 'a')
         with open(javaClass, 'rb') as fp:
-            zf.writestr(os.path.basename(javaClass), fp.read())
+            zf.writestr(javaClassName.replace('.', '/') + '.class', fp.read())
         zf.close()
         os.unlink(javaSource)
         os.unlink(javaClass)
+        javaClassParent = os.path.dirname(javaClass)
+        while len(os.listdir(javaClassParent)) == 0:
+            os.rmdir(javaClassParent)
+            javaClassParent = os.path.dirname(javaClassParent)
 
 def _copyToJdk(src, dst, permissions=JDK_UNIX_PERMISSIONS_FILE):
     name = os.path.basename(src)
@@ -588,6 +595,12 @@
     """
 
     if dist.name == 'GRAAL_TRUFFLE':
+        # The content in graalRuntime.inline.hpp is generated from Graal
+        # classes that implement com.oracle.graal.api.runtime.Service
+        # or contain com.oracle.graal.options.Option annotated fields.
+        # Since GRAAL_TRUFFLE is the leaf most distribution containing
+        # such classes, the generation is triggered when GRAAL_TRUFFLE
+        # is (re)built.
         _update_graalRuntime_inline_hpp(dist)
     jdks = _jdksDir()
 
@@ -1110,12 +1123,23 @@
             t, method = words
 
             for c, p in candidates.iteritems():
-                if t in c:
+                # prefer exact matches first
+                if t == c:
                     found = True
-                    classes.append(c + '#' + method)
+                    classes.append(c)
                     projs.add(p.name)
             if not found:
+                for c, p in candidates.iteritems():
+                    if t in c:
+                        found = True
+                        classes.append(c)
+                        projs.add(p.name)
+            if not found:
                 mx.log('warning: no tests matched by substring "' + t)
+            elif len(classes) != 1:
+                mx.abort('More than one test matches substring {0} {1}'.format(t, classes))
+
+            classes = [c + "#" + method for c in classes]
         else:
             for t in tests:
                 if '#' in t:
--- a/mxtool/mx.py	Wed Dec 17 16:50:38 2014 +0100
+++ b/mxtool/mx.py	Thu Dec 18 15:23:08 2014 +0100
@@ -2339,7 +2339,7 @@
                 if not args.error_prone:
                     javac = args.alt_javac if args.alt_javac else mainJava.javac
                     self.logCompilation('javac' if not args.alt_javac else args.alt_javac)
-                    javacCmd = [javac, '-g', '-J-Xmx1g', '-J-Xms1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()]
+                    javacCmd = [javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()]
                     if jdk.debug_port is not None:
                         javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)]
                     javacCmd += processorArgs
@@ -2350,7 +2350,7 @@
                     run(javacCmd)
                 else:
                     self.logCompilation('javac (with error-prone)')
-                    javaArgs = ['-Xmx1g', '-Xms1g']
+                    javaArgs = ['-Xmx1g']
                     javacArgs = ['-g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()]
                     javacArgs += processorArgs
                     javacArgs += ['@' + argfile.name]
@@ -2360,7 +2360,7 @@
             else:
                 self.logCompilation('JDT')
 
-                jdtVmArgs = ['-Xmx1g', '-Xms1g', '-jar', _cygpathU2W(self.jdtJar)]
+                jdtVmArgs = ['-Xmx1g', '-jar', _cygpathU2W(self.jdtJar)]
 
                 jdtArgs = ['-' + compliance,
                          '-cp', cp, '-g', '-enableJavadoc',
@@ -3172,7 +3172,7 @@
             try:
                 for chunk in _chunk_files_for_command_line(javafilelist):
                     try:
-                        run_java(['-Xmx1g', '-Xms1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False)
+                        run_java(['-Xmx1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False)
                     finally:
                         if exists(auditfileName):
                             errors = []
--- a/src/share/vm/graal/graalRuntime.cpp	Wed Dec 17 16:50:38 2014 +0100
+++ b/src/share/vm/graal/graalRuntime.cpp	Thu Dec 18 15:23:08 2014 +0100
@@ -713,7 +713,7 @@
 JVM_END
 
 void GraalRuntime::check_generated_sources_sha1(TRAPS) {
-  TempNewSymbol name = SymbolTable::new_symbol("GeneratedSourcesSha1", CHECK_ABORT);
+  TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/sourcegen/GeneratedSourcesSha1", CHECK_ABORT);
   KlassHandle klass = load_required_class(name);
   fieldDescriptor fd;
   if (!InstanceKlass::cast(klass())->find_field(vmSymbols::value_name(), vmSymbols::string_signature(), true, &fd)) {
--- a/src/share/vm/runtime/deoptimization.cpp	Wed Dec 17 16:50:38 2014 +0100
+++ b/src/share/vm/runtime/deoptimization.cpp	Thu Dec 18 15:23:08 2014 +0100
@@ -1228,17 +1228,12 @@
 
   gather_statistics(reason, Action_none, Bytecodes::_illegal);
 
-  // Patch the nmethod so that when execution returns to it we will
-  // deopt the execution state and return to the interpreter.
-  fr.deoptimize(thread);
-
   if (LogCompilation && xtty != NULL) {
     nmethod* nm = fr.cb()->as_nmethod_or_null();
     assert(nm != NULL, "only nmethods can deopt");
 
     ttyLocker ttyl;
-    xtty->begin_head("deoptimized thread='" UINTX_FORMAT "' compile_id='%d'",
-               thread->osthread()->thread_id(), nm != NULL ? nm->compile_id() : -1);
+    xtty->begin_head("deoptimized thread='" UINTX_FORMAT "'", thread->osthread()->thread_id());
     nm->log_identity(xtty);
     xtty->end_head();
     for (ScopeDesc* sd = nm->scope_desc_at(fr.pc()); ; sd = sd->sender()) {
@@ -1249,6 +1244,10 @@
     }
     xtty->tail("deoptimized");
   }
+
+  // Patch the nmethod so that when execution returns to it we will
+  // deopt the execution state and return to the interpreter.
+  fr.deoptimize(thread);
 }
 
 void Deoptimization::deoptimize(JavaThread* thread, frame fr, RegisterMap *map) {