Since JDK-8348426, If -XX:AOTMode=record is specified in the command-line, the application's behavior is affected in the following 2 ways:
[1] The application is not able to launch new Threads. The fix is:
--- a/src/hotspot/share/cds/cdsConfig.cpp
+++ b/src/hotspot/share/cds/cdsConfig.cpp
@@ -561,7 +561,7 @@ bool CDSConfig::is_dumping_final_static_archive() {
bool CDSConfig::allow_only_single_java_thread() {
// See comments in JVM_StartThread()
- return is_dumping_static_archive();
+ return is_dumping_classic_static_archive() || is_dumping_final_static_archive();
}
[2] The exit code is ignored and becomes zero. The fix is:
index ee877c474b9..3658a28c102 100644
--- a/src/hotspot/share/cds/metaspaceShared.cpp
+++ b/src/hotspot/share/cds/metaspaceShared.cpp
@@ -823,8 +823,10 @@ void MetaspaceShared::preload_and_dump(TRAPS) {
if (CDSConfig::new_aot_flags_used()) {
if (CDSConfig::is_dumping_preimage_static_archive()) {
+ // We are in the JVM that runs the training run. Continue execution,
+ // so that it can finish all clean-up and return the correct exit
+ // code to the OS.
tty->print_cr("AOTConfiguration recorded: %s", AOTConfiguration);
- vm_exit(0);
} else {
[1] The application is not able to launch new Threads. The fix is:
--- a/src/hotspot/share/cds/cdsConfig.cpp
+++ b/src/hotspot/share/cds/cdsConfig.cpp
@@ -561,7 +561,7 @@ bool CDSConfig::is_dumping_final_static_archive() {
bool CDSConfig::allow_only_single_java_thread() {
// See comments in JVM_StartThread()
- return is_dumping_static_archive();
+ return is_dumping_classic_static_archive() || is_dumping_final_static_archive();
}
[2] The exit code is ignored and becomes zero. The fix is:
index ee877c474b9..3658a28c102 100644
--- a/src/hotspot/share/cds/metaspaceShared.cpp
+++ b/src/hotspot/share/cds/metaspaceShared.cpp
@@ -823,8 +823,10 @@ void MetaspaceShared::preload_and_dump(TRAPS) {
if (CDSConfig::new_aot_flags_used()) {
if (CDSConfig::is_dumping_preimage_static_archive()) {
+ // We are in the JVM that runs the training run. Continue execution,
+ // so that it can finish all clean-up and return the correct exit
+ // code to the OS.
tty->print_cr("AOTConfiguration recorded: %s", AOTConfiguration);
- vm_exit(0);
} else {
- caused by
-
JDK-8348426 Generate binary file for -XX:AOTMode=record -XX:AOTConfiguration=file
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/a7ad4144
-
Review(master) openjdk/jdk/24003