Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8362561

Remove diagnostic option AllowArchivingWithJavaAgent

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • None
    • hotspot
    • b17

      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. See JDK-8361725

      By removing these test cases, we can also remove the AllowArchivingWithJavaAgent switch to prevent abuse.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: