-
Bug
-
Resolution: Fixed
-
P3
-
25
-
b08
I realized that I can't debug (i.e. with a Java debugger) the Graal compiler initialization if it happens eagerly (e.g. with `EagerJVMCI`, `JVMCIPrintProperties`, `JVMCILibDumpJNIConfig`). Not that this is something I need every day, but I think it can easily be fixed by moving the early initializing a little further down, right after `JvmtiExport::post_vm_initialized()`:
```
diff --git a/src/hotspot/share/runtime/threads.cpp b/src/hotspot/share/runtime/threads.cpp
index 1cab9bc5d53..191409c22e3 100644
--- a/src/hotspot/share/runtime/threads.cpp
+++ b/src/hotspot/share/runtime/threads.cpp
@@ -806,12 +806,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
#endif
-#if INCLUDE_JVMCI
- if (force_JVMCI_initialization) {
- JVMCI::initialize_compiler(CHECK_JNI_ERR);
- }
-#endif
-
if (NativeHeapTrimmer::enabled()) {
NativeHeapTrimmer::initialize();
}
@@ -826,6 +820,12 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// Notify JVMTI agents that VM initialization is complete - nop if no agents.
JvmtiExport::post_vm_initialized();
+#if INCLUDE_JVMCI
+ if (force_JVMCI_initialization) {
+ JVMCI::initialize_compiler(CHECK_JNI_ERR);
+ }
+#endif
+
JFR_ONLY(Jfr::on_create_vm_3();)
#if INCLUDE_MANAGEMENT
```
```
diff --git a/src/hotspot/share/runtime/threads.cpp b/src/hotspot/share/runtime/threads.cpp
index 1cab9bc5d53..191409c22e3 100644
--- a/src/hotspot/share/runtime/threads.cpp
+++ b/src/hotspot/share/runtime/threads.cpp
@@ -806,12 +806,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
#endif
-#if INCLUDE_JVMCI
- if (force_JVMCI_initialization) {
- JVMCI::initialize_compiler(CHECK_JNI_ERR);
- }
-#endif
-
if (NativeHeapTrimmer::enabled()) {
NativeHeapTrimmer::initialize();
}
@@ -826,6 +820,12 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// Notify JVMTI agents that VM initialization is complete - nop if no agents.
JvmtiExport::post_vm_initialized();
+#if INCLUDE_JVMCI
+ if (force_JVMCI_initialization) {
+ JVMCI::initialize_compiler(CHECK_JNI_ERR);
+ }
+#endif
+
JFR_ONLY(Jfr::on_create_vm_3();)
#if INCLUDE_MANAGEMENT
```
- links to
-
Commit(master) openjdk/jdk/76f792b5
-
Review(master) openjdk/jdk/23219