mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8257020: [JVMCI] enable a JVMCICompiler to specify which GCs it supports
Reviewed-by: stefank, kvn
This commit is contained in:
parent
129c37700f
commit
fa58671f9f
21 changed files with 197 additions and 41 deletions
|
@ -635,6 +635,31 @@ void JVMCIEnv::fthrow_error(const char* file, int line, const char* format, ...)
|
|||
}
|
||||
}
|
||||
|
||||
jboolean JVMCIEnv::call_HotSpotJVMCIRuntime_isGCSupported (JVMCIObject runtime, jint gcIdentifier) {
|
||||
JavaThread* THREAD = JavaThread::current();
|
||||
if (is_hotspot()) {
|
||||
JavaCallArguments jargs;
|
||||
jargs.push_oop(Handle(THREAD, HotSpotJVMCI::resolve(runtime)));
|
||||
jargs.push_int(gcIdentifier);
|
||||
JavaValue result(T_BOOLEAN);
|
||||
JavaCalls::call_special(&result,
|
||||
HotSpotJVMCI::HotSpotJVMCIRuntime::klass(),
|
||||
vmSymbols::isGCSupported_name(),
|
||||
vmSymbols::int_bool_signature(), &jargs, CHECK_0);
|
||||
return result.get_jboolean();
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jboolean result = jni()->CallNonvirtualBooleanMethod(runtime.as_jobject(),
|
||||
JNIJVMCI::HotSpotJVMCIRuntime::clazz(),
|
||||
JNIJVMCI::HotSpotJVMCIRuntime::isGCSupported_method(),
|
||||
gcIdentifier);
|
||||
if (jni()->ExceptionCheck()) {
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_compileMethod (JVMCIObject runtime, JVMCIObject method, int entry_bci,
|
||||
jlong compile_state, int id) {
|
||||
JavaThread* THREAD = JVMCI::compilation_tick(JavaThread::current());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue