8316273: JDK-8315818 broke JVMCIPrintProperties on libgraal

Reviewed-by: never, kvn
This commit is contained in:
Doug Simon 2023-09-16 21:31:23 +00:00
parent e62419823a
commit 4b8f5d031a
4 changed files with 13 additions and 10 deletions
src
hotspot/share
jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot

@ -591,7 +591,7 @@ void register_jfr_phasetype_serializer(CompilerType compiler_type) {
// CompileBroker::compilation_init
//
// Initialize the Compilation object
void CompileBroker::compilation_init_phase1(JavaThread* THREAD) {
void CompileBroker::compilation_init(JavaThread* THREAD) {
// No need to initialize compilation system if we do not use it.
if (!UseCompiler) {
return;
@ -750,11 +750,7 @@ void CompileBroker::compilation_init_phase1(JavaThread* THREAD) {
(jlong)CompileBroker::no_compile,
CHECK);
}
}
// Completes compiler initialization. Compilation requests submitted
// prior to this will be silently ignored.
void CompileBroker::compilation_init_phase2() {
_initialized = true;
}

@ -291,8 +291,7 @@ public:
CompileQueue *q = compile_queue(comp_level);
return q != nullptr ? q->size() : 0;
}
static void compilation_init_phase1(JavaThread* THREAD);
static void compilation_init_phase2();
static void compilation_init(JavaThread* THREAD);
static void init_compiler_thread_log();
static nmethod* compile_method(const methodHandle& method,
int osr_bci,

@ -692,16 +692,24 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// initialize compiler(s)
#if defined(COMPILER1) || COMPILER2_OR_JVMCI
bool init_compilation = true;
#if INCLUDE_JVMCI
bool force_JVMCI_initialization = false;
if (EnableJVMCI) {
// Initialize JVMCI eagerly when it is explicitly requested.
// Or when JVMCILibDumpJNIConfig or JVMCIPrintProperties is enabled.
force_JVMCI_initialization = EagerJVMCI || JVMCIPrintProperties || JVMCILibDumpJNIConfig;
if (JVMCIPrintProperties || JVMCILibDumpJNIConfig) {
// Both JVMCILibDumpJNIConfig and JVMCIPrintProperties exit the VM
// so compilation should be disabled. This prevents dumping or
// printing from happening more than once.
init_compilation = false;
}
}
#endif
CompileBroker::compilation_init_phase1(CHECK_JNI_ERR);
CompileBroker::compilation_init_phase2();
if (init_compilation) {
CompileBroker::compilation_init(CHECK_JNI_ERR);
}
#endif
// Start string deduplication thread if requested.

@ -564,7 +564,7 @@ public final class HotSpotJVMCIRuntime implements JVMCIRuntime {
}
Option.printProperties(vmLogStream);
compilerFactory.printProperties(vmLogStream);
System.exit(0);
exitHotSpot(0);
}
if (Option.PrintConfig.getBoolean()) {