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

Add the AllowArchivingWithJavaAgent diagnostic vm option to allow the use of the -javaagent option during CDS dumping

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 11
    • hotspot
    • b21

      The bootclasspath can be modified using a JVMTI agent via the AddToBootstrapClassLoaderSearch function.
      The classpath can be modified using a JVMTI agent via the AddToSystemClassLoaderSearch function.
      The above modifications can be done in the JVMTI_PHASE_ONLOAD or the JVMTI_PHASE_LIVE phase.

      During the JVMTI_PHASE_ONLOAD, the AppCDS shared path hasn't been setup. So modifying the bootclasspath or classpath during the ONLOAD phase shouldn't affect AppCDS dumping. However, the shared path has been setup during the LIVE phase and it would be rather complicated to setup the shared path again.

      The proposed change is to abort CDS dumping with an error message if the AddToBootstrapClassLoaderSearch or the AddToSystemClassLoaderSearch is called during dumping.

            ccheung Calvin Cheung
            ccheung Calvin Cheung
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: