RFR: 8213445: jcmd VM.symboltable and VM.stringtable -verbose output contains no shared symbols or strings [v2]

Calvin Cheung ccheung at openjdk.java.net
Thu Apr 14 16:36:33 UTC 2022


On Wed, 13 Apr 2022 23:59:14 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   prefix comments with '#'
>
> src/hotspot/share/classfile/symbolTable.cpp line 623:
> 
>> 621:     }
>> 622:     if (!_dynamic_shared_table.empty()) {
>> 623:       st->print_cr("---------------");
> 
> I think it's better to prefix the comments with `#`. That way it will be easier to include the string/symbol output into -XX: SharedArchiveConfigFile.

Fixed.

Thanks for your review.

> test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestDynamicDump.java line 33:
> 
>> 31:  * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
>> 32:  * @modules jdk.jcmd/sun.tools.common:+open
>> 33:  * @compile ../../../../../../lib/jdk/test/lib/apps/LingeredApp.java
> 
> Is this change necessary? It seems unrelated to this PR.

Yes. Otherwise, I saw the following failures in the tests under cds/appcds/jcmd


<prefix path>/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/2/runtime/cds/appcds/jcmd/JCmdTestFileSafety.d/jdk/test/lib/apps/LingeredApp.class : no such file or directory
<prefix path>/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/2/runtime/cds/appcds/jcmd/JCmdTestFileSafety.d/jdk/test/lib/apps/LingeredApp$1.class : no such file or directory
java.lang.RuntimeException: jar operation failed
	at JarBuilder.createJar(JarBuilder.java:216)
	at JarBuilder.createSimpleJar(JarBuilder.java:180)
	at JarBuilder.build(JarBuilder.java:90)
	at JCmdTestDumpBase.buildJars(JCmdTestDumpBase.java:91)
	at JCmdTestFileSafety.test(JCmdTestFileSafety.java:75)
	at JCmdTestDumpBase.runTest(JCmdTestDumpBase.java:61)
	at JCmdTestFileSafety.main(JCmdTestFileSafety.java:145)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:828)

Not sure why my new DynamicSharedSymbols.java seems to trigger the above failure.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8234


More information about the hotspot-runtime-dev mailing list