Skip to content

Commit cbff6cd

Browse files
committed
ristretto: do not use GraalError in profile code that is called from the
interpreter
1 parent f5ef369 commit cbff6cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

substratevm/src/com.oracle.svm.interpreter/src/com/oracle/svm/interpreter/ristretto/profile/RistrettoProfileSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import com.oracle.svm.core.log.Log;
3333
import com.oracle.svm.core.option.RuntimeOptionKey;
34+
import com.oracle.svm.core.util.VMError;
3435
import com.oracle.svm.interpreter.metadata.CremaResolvedJavaMethodImpl;
3536
import com.oracle.svm.interpreter.metadata.InterpreterResolvedJavaMethod;
3637
import com.oracle.svm.interpreter.metadata.profile.MethodProfile;
@@ -40,7 +41,6 @@
4041
import com.oracle.svm.interpreter.ristretto.meta.RistrettoMethod;
4142

4243
import jdk.graal.compiler.api.replacements.Fold;
43-
import jdk.graal.compiler.debug.GraalError;
4444
import jdk.graal.compiler.nodes.PauseNode;
4545

4646
public class RistrettoProfileSupport {
@@ -149,7 +149,7 @@ public static MethodProfile profileMethodEntry(InterpreterResolvedJavaMethod iMe
149149
break;
150150
}
151151
default:
152-
throw GraalError.shouldNotReachHere("Unknown state " + oldState);
152+
throw VMError.shouldNotReachHere("Unknown state " + oldState);
153153
}
154154
oldState = COMPILATION_STATE_UPDATER.get(rMethod);
155155
} while (true);
@@ -191,7 +191,7 @@ private static void methodEntryInitCase(InterpreterResolvedJavaMethod iMethod, R
191191
trace(RistrettoRuntimeOptions.JITTraceCompilationQueuing, "[Ristretto Compile Queue]Entering state %s for %s%n",
192192
RistrettoCompileStateMachine.toString(COMPILATION_STATE_UPDATER.get(rMethod)), iMethod);
193193
if (!COMPILATION_STATE_UPDATER.compareAndSet(rMethod, RistrettoConstants.COMPILE_STATE_INITIALIZING, RistrettoConstants.COMPILE_STATE_NEVER_COMPILED)) {
194-
throw GraalError.shouldNotReachHere("We set transition to COMPILE_STATE_INITIALIZING, we must be allowed to set it to COMPILE_STATE_NEVER_COMPILED");
194+
throw VMError.shouldNotReachHere("We set transition to COMPILE_STATE_INITIALIZING, we must be allowed to set it to COMPILE_STATE_NEVER_COMPILED");
195195
}
196196
// continue to the NEVER_COMPILED state
197197
trace(RistrettoRuntimeOptions.JITTraceCompilationQueuing, "[Ristretto Compile Queue]Finished setting state %s for %s%n",

0 commit comments

Comments
 (0)