< prev index next >
src/hotspot/share/jvmci/jvmciCompiler.cpp
Print this page
@@ -105,43 +105,43 @@
if (PrintBootstrap) {
tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
}
_bootstrapping = false;
- JVMCI::compiler_runtime()->bootstrap_finished(CHECK);
+ JVMCI::java_runtime()->bootstrap_finished(CHECK);
}
bool JVMCICompiler::force_comp_at_level_simple(Method *method) {
+ if (_bootstrapping) {
+ // When bootstrapping, the JVMCI compiler can compile its own methods.
+ return false;
+ }
if (UseJVMCINativeLibrary) {
// This mechanism exists to force compilation of a JVMCI compiler by C1
- // to reduces the compilation time spent on the JVMCI compiler itself. In
+ // to reduce the compilation time spent on the JVMCI compiler itself. In
// +UseJVMCINativeLibrary mode, the JVMCI compiler is AOT compiled.
return false;
- }
-
- if (_bootstrapping) {
- // When bootstrapping, the JVMCI compiler can compile its own methods.
+ } else {
+ JVMCIRuntime* runtime = JVMCI::java_runtime();
+ if (runtime != NULL) {
+ JVMCIObject receiver = runtime->probe_HotSpotJVMCIRuntime();
+ if (receiver.is_null()) {
return false;
}
-
- JVMCIRuntime* runtime = JVMCI::compiler_runtime();
- if (runtime != NULL && runtime->is_HotSpotJVMCIRuntime_initialized()) {
- JavaThread* thread = JavaThread::current();
- HandleMark hm(thread);
- THREAD_JVMCIENV(thread);
- JVMCIObject receiver = runtime->get_HotSpotJVMCIRuntime(JVMCIENV);
- objArrayHandle excludeModules(thread, HotSpotJVMCI::HotSpotJVMCIRuntime::excludeFromJVMCICompilation(JVMCIENV, HotSpotJVMCI::resolve(receiver)));
+ JVMCIEnv* ignored_env = NULL;
+ objArrayHandle excludeModules(JavaThread::current(), HotSpotJVMCI::HotSpotJVMCIRuntime::excludeFromJVMCICompilation(ignored_env, HotSpotJVMCI::resolve(receiver)));
if (excludeModules.not_null()) {
ModuleEntry* moduleEntry = method->method_holder()->module();
for (int i = 0; i < excludeModules->length(); i++) {
if (oopDesc::equals(excludeModules->obj_at(i), moduleEntry->module())) {
return true;
}
}
}
}
return false;
+ }
}
// Compilation entry point for methods
void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
ShouldNotReachHere();
< prev index next >