On Fri, 25 Sep 2020 21:19:39 GMT, Yumin Qi <mi...@openjdk.org> wrote:
>> This patch is reorganized after 8252725, which is separated from this patch >> to refactor jlink glugin code. The previous >> webrev with hg can be found at: >> http://cr.openjdk.java.net/~minqi/2020/8247536/webrev-05. With 8252725 >> integrated, the >> regeneration of holder classes is simply to call the new added >> GenerateJLIClassesHelper.cdsGenerateHolderClasses >> function. Tests: tier1-4 > > Yumin Qi has updated the pull request incrementally with one additional > commit since the last revision: > > 8247536: Support for pre-generated java.lang.invoke classes in CDS static > archive Changes requested by iklam (Reviewer). test/hotspot/jtreg/runtime/cds/appcds/DumpClassListWithLF.java line 32: > 30: * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds > 31: * @compile ClassListFormatBase.java test-classes/Hello.java > 32: * @run driver DumpClassListWithLF The `@compile` line can be removed to speed up the test execution. You can add this: @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes and also change the code below appJar, classlist( - "Hello", + Hello.class.getName(), (There's no need for `/test/hotspot/jtreg/runtime/cds/appcds` in `@library` because that's the current directory of this test). test/hotspot/jtreg/runtime/cds/appcds/DumpClassListWithLF.java line 53: > 51: "Hello", > 52: "@lambda-form-invoker [LF_RESOLVE] > java.lang.invoke.DirectMethodHandle$Holder invokeStatic L7_L > (success)", 53: "@lambda-form-invoker [LF_RESOLVE] > java.lang.invoke.DirectMethodHandle$Holder > invokeStatic LL_I (success)"), I think the `(success)` part should not be included in the classlist. The classlist is the public interface. It should be concise and include only the necessary information. @lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L7_L @lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LL_I test/hotspot/jtreg/runtime/cds/appcds/customLoader/ProhibitedPackageNamesTest.java line 31: > 29: * @requires vm.cds.custom.loaders > 30: * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds > 31: * @compile ../ClassListFormatBase.java ../test-classes/Hello.java > test-classes/InProhibitedPkg.java Similar comment for avoiding `@compile`. `@compile` has been mis-used by older CDS tests. We should avoid using it, and should remove it when we are touching the old tests. src/hotspot/share/classfile/systemDictionary.cpp line 1864: > 1862: > 1863: // Used for assertions and verification, also used from > LambdaFormInvokers::reload_class > 1864: // to get original class which has already been loaded. Is the above comment change still needed? ------------- PR: https://git.openjdk.java.net/jdk/pull/193