The benefits of removing the UseAppCDS flag:
1. Cleaner code
2. Less confusion in the community about CDS and AppCDS. AppCDS is CDS but with app classes supported in the archive. It adds extra complexity to force the separation of the two.
3. Simpler usage, which will result more adoption.
SharedArchiveFile option
---------------------------------
The -XX:SharedArchiveFile is a product flag when UseAppCDS is enabled, but is a diagnostic flag when UseAppCDS is disabled. As a result of making UseAppCDS obsolete, SharedArchiveFile will become a product flag by default. Specifying +UnlockDiagnosticVMOptions for SharedArchiveFile will no longer be needed in all configurations.
Non-empty directory handling
---------------------------------------
CDS/AppCDS reports error for non-empty directory:
- For base CDS, non-empty directory cannot exist in -Xbootclasspath/a path
- With AppCDS enabled, non-empty directory cannot exist in -Xbootclasspath/a path, class path, and module path
After making UseAppCDS obsolete, the behavior for non-empty directory handling will be based on class type on the classlist:
- If no app classes are loaded, dump time only reports error if non-empty directory exists in -Xbootclasspath/a path
- If app classes are loaded, dump time reports error for non-empty directory exists in -Xbootclasspath/a path, class path, or module path
Above behavior is backward compatible.
- csr for
-
JDK-8197963 Make the UseAppCDS option obsolete
- Closed
- relates to
-
JDK-8303495 Unused path parameter in ClassLoader::add_to_app_classpath_entries(JavaThread* current, char* path, ...)
- Resolved
-
JDK-8203031 segfaults from jvmti_AddToBootstrapClassLoaderSearch
- Resolved
-
JDK-8182731 Odd handling of -XX:-UseAppCDS and -XX:SharedArchiveFile
- Resolved
-
JDK-8202452 Delete test files missed from commit for 8193213&8182731
- Closed
-
JDK-8202282 [TESTBUG] appcds TestCommon.makeCommandLineForAppCDS() can be removed
- Resolved
-
JDK-8185996 JEP 310: Application Class-Data Sharing
- Closed
1.
|
Document UseAppCDS change in JDK 11 | Resolved | Clifford Wayne (Inactive) | 2018-07-31 |