Skip to content
Closed
2 changes: 1 addition & 1 deletion src/hotspot/share/jvmci/jvmciCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ JVMCICompiler::JVMCICompiler() : AbstractCompiler(compiler_jvmci) {

JVMCICompiler* JVMCICompiler::instance(bool require_non_null, TRAPS) {
if (!EnableJVMCI) {
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), JAVA_NOT_ENABLED_ERROR_MESSAGE)
}
if (_instance == nullptr && require_non_null) {
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "The JVMCI compiler instance has not been created");
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/jvmci/jvmciRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ JRT_END
JVM_ENTRY_NO_ENV(jobject, JVM_GetJVMCIRuntime(JNIEnv *libjvmciOrHotspotEnv, jclass c))
JVMCIENV_FROM_JNI(thread, libjvmciOrHotspotEnv);
if (!EnableJVMCI) {
JVMCI_THROW_MSG_NULL(InternalError, "JVMCI is not enabled");
JVMCI_THROW_MSG_NULL(InternalError, JAVA_NOT_ENABLED_ERROR_MESSAGE);
}
JVMCIENV->runtime()->initialize_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL);
JVMCIObject runtime = JVMCIENV->runtime()->get_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL);
Expand All @@ -732,7 +732,7 @@ JVM_END
JVM_ENTRY_NO_ENV(jlong, JVM_ReadSystemPropertiesInfo(JNIEnv *env, jclass c, jintArray offsets_handle))
JVMCIENV_FROM_JNI(thread, env);
if (!EnableJVMCI) {
JVMCI_THROW_MSG_0(InternalError, "JVMCI is not enabled");
JVMCI_THROW_MSG_0(InternalError, JAVA_NOT_ENABLED_ERROR_MESSAGE);
}
JVMCIPrimitiveArray offsets = JVMCIENV->wrap(offsets_handle);
JVMCIENV->put_int_at(offsets, 0, SystemProperty::next_offset_in_bytes());
Expand Down Expand Up @@ -1515,7 +1515,7 @@ JVM_ENTRY_NO_ENV(void, JVM_RegisterJVMCINatives(JNIEnv *libjvmciOrHotspotEnv, jc
JVMCIENV_FROM_JNI(thread, libjvmciOrHotspotEnv);

if (!EnableJVMCI) {
JVMCI_THROW_MSG(InternalError, "JVMCI is not enabled");
JVMCI_THROW_MSG(InternalError, JAVA_NOT_ENABLED_ERROR_MESSAGE);
}

JVMCIENV->runtime()->initialize(JVMCIENV);
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/jvmci/jvmciRuntime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "gc/g1/g1CardTable.hpp"
#endif // INCLUDE_G1GC

#define JAVA_NOT_ENABLED_ERROR_MESSAGE "JVMCI is not enabled. Must specify '--add-modules=jdk.internal.vm.ci' or '-XX:+EnableJVMCI' to the java launcher."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You meant JVMCI_NOT_ENABLED_ERROR_MESSAGE I assume?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You meant JVMCI_NOT_ENABLED_ERROR_MESSAGE I assume?

Ha! Nice catch ;-)


class JVMCIEnv;
class JVMCICompiler;
class JVMCICompileState;
Expand Down