Some old CDS tests cases use Java agents during "java -Xshare:dump" for injecting Java execution (to set up certain pre-conditions, etc). See
https://github.com/openjdk/jdk/blob/bd55d7a49514da9fa4de0d4a372956e21deab4d2/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java
These tests cases were written when only a very limited amount of Java code was executed when dumping the static archive. To increase coverage, we needed to use a Java agent to provoke certain conditions (e.g., to trigger a GC).
Nowadays with the AOT cache assembly phase, we execute a significant amount of Java code. So we no longer need such tests.
These tests require the diagnostic -XX:+AllowArchivingWithJavaAgent switch which can sometimes be abused and produce undesirable side effects. SeeJDK-8361725
By removing these test cases, we can also remove the AllowArchivingWithJavaAgent switch to prevent abuse.
https://github.com/openjdk/jdk/blob/bd55d7a49514da9fa4de0d4a372956e21deab4d2/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java
These tests cases were written when only a very limited amount of Java code was executed when dumping the static archive. To increase coverage, we needed to use a Java agent to provoke certain conditions (e.g., to trigger a GC).
Nowadays with the AOT cache assembly phase, we execute a significant amount of Java code. So we no longer need such tests.
These tests require the diagnostic -XX:+AllowArchivingWithJavaAgent switch which can sometimes be abused and produce undesirable side effects. See
By removing these test cases, we can also remove the AllowArchivingWithJavaAgent switch to prevent abuse.
- causes
-
JDK-8368616 runtime/cds/appcds/aotCache/JavaAgent.java#dynamic fails on non CDS platforms/builds after JDK-8362561
-
- Resolved
-
- relates to
-
JDK-8361725 Do not load Java agent with "-Xshare:dump -XX:+AOTClassLinking"
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/000569da
-
Review(master) openjdk/jdk/27304