--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java 2017-07-07 09:31:21.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java 2017-07-07 09:31:21.000000000 -0700 @@ -22,7 +22,7 @@ */ package org.graalvm.compiler.nodes; -import org.graalvm.compiler.debug.Debug; +import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.lir.gen.LIRGeneratorTool; import org.graalvm.compiler.nodeinfo.NodeInfo; @@ -83,8 +83,11 @@ @SuppressWarnings("deprecation") public int getDebugId() { int deoptDebugId = debugId; - if (deoptDebugId == DEFAULT_DEBUG_ID && (Debug.isDumpEnabledForMethod() || Debug.isLogEnabledForMethod())) { - deoptDebugId = this.getId(); + if (deoptDebugId == DEFAULT_DEBUG_ID) { + DebugContext debug = getDebug(); + if ((debug.isDumpEnabledForMethod() || debug.isLogEnabledForMethod())) { + deoptDebugId = this.getId(); + } } return deoptDebugId; }