RFR: 8276184: Exclude lambda proxy class from the CDS archive if its caller class is excluded [v4]
Ioi Lam
iklam at openjdk.java.net
Tue Nov 9 03:12:37 UTC 2021
On Mon, 8 Nov 2021 22:13:22 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java line 70:
>>
>>> 68: // Test class exists in both signed JAR and unsigned JAR
>>> 69: String jars = signedJar + System.getProperty("path.separator") + unsignedJar;
>>> 70: output = TestCommon.dump(jars, TestCommon.list(mainClass));
>>
>> Does the VM log a message for the excluded lambda proxy as well? If so, maybe we should check that here, too.
>
> Not in this case. When the `do_entry()` of `ExcludeDumpTimeSharedClasses` is called, it doesn't know that the lambda proxy is associated with a signed `caller_ik`. If there's a need for a log message, it needs to be added in the `do_entry()` of `CleanupDumpTimeLambdaProxyClassTable`.
Checking the exclusion message, even if it's printed, will be more involved, especially if you want to ensure that several such proxy classes are excluded. Since the proxies have similar but non-deterministic names (they have numbers in them), you will need to search for a pattern in the log and count the number of times it appears.
I think it's easier and more reliable to run with `-Xlog:cds+class=debug`, and check that the proxy class is not in the print out.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6205
More information about the hotspot-runtime-dev
mailing list