-XX:DumpLoadedClassList doesn't work as expected when cds is disabled.
* Reproduce
-------------------------------------
# For a VM with cds disabled, just run
java -XX:DumpLoadedClassList=my.log ...
-------------------------------------
* Background
This bug was found while we were debugging a jdk build error.
-------------------------------------
bash configure --disable-cds --enable-generate-classlist ...
make images
-------------------------------------
The following was the failing message.
-------------------------------------
Compiling 1 files for CLASSLIST_JAR
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Creating support/demos/image/jfc/J2Ddemo/J2Ddemo.jar
Creating support/classlist.jar
/bin/grep: /home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist.raw: No such file or directory
make[3]: *** [/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist] Error 2
make[3]: *** Deleting file '/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist'
GenerateLinkOptData.gmk:65: recipe for target '/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist' failed
make[2]: *** [generate-link-opt-data] Error 2
make/Main.gmk:495: recipe for target 'generate-link-opt-data' failed
ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-release' (exit code 2)
Stopping sjavac server
-------------------------------------
* Analysis
The failure is actually caused by -XX:DumpLoadedClassList [1], which doesn't work as expected when cds is disabled.
People may get confused since the VM fails to report an error for DumpLoadedClassList when cds is disabled.
[1] http://hg.openjdk.java.net/jdk/jdk/file/ca620b06b5c9/make/GenerateLinkOptData.gmk#l68
* Reproduce
-------------------------------------
# For a VM with cds disabled, just run
java -XX:DumpLoadedClassList=my.log ...
-------------------------------------
* Background
This bug was found while we were debugging a jdk build error.
-------------------------------------
bash configure --disable-cds --enable-generate-classlist ...
make images
-------------------------------------
The following was the failing message.
-------------------------------------
Compiling 1 files for CLASSLIST_JAR
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Creating support/demos/image/jfc/J2Ddemo/J2Ddemo.jar
Creating support/classlist.jar
/bin/grep: /home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist.raw: No such file or directory
make[3]: *** [/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist] Error 2
make[3]: *** Deleting file '/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist'
GenerateLinkOptData.gmk:65: recipe for target '/home/fool/workspace/jdk/build/linux-x86_64-server-release/support/link_opt/classlist' failed
make[2]: *** [generate-link-opt-data] Error 2
make/Main.gmk:495: recipe for target 'generate-link-opt-data' failed
ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-release' (exit code 2)
Stopping sjavac server
-------------------------------------
* Analysis
The failure is actually caused by -XX:DumpLoadedClassList [1], which doesn't work as expected when cds is disabled.
People may get confused since the VM fails to report an error for DumpLoadedClassList when cds is disabled.
[1] http://hg.openjdk.java.net/jdk/jdk/file/ca620b06b5c9/make/GenerateLinkOptData.gmk#l68
- relates to
-
JDK-8232768 Configuration with --disable-cds --enable-generate-classlist should be reported as an error
-
- Resolved
-