RFR: 8247536: Support for pre-generated java.lang.invoke classes in CDS static archive [v7]

Ioi Lam iklam at openjdk.java.net
Thu Oct 1 21:14:05 UTC 2020


On Wed, 30 Sep 2020 04:59:20 GMT, Yumin Qi <minqi at 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:
> 
>   Remove trailing word of line which is not used in holder class regeneration. There is a trailing LF (Line Feed) so trim
>   white spaces from both front and end of the line or it will fail method type validation.

Changes requested by iklam (Reviewer).

src/java.base/share/classes/jdk/internal/misc/CDS.java line 30:

> 28: public class CDS {
> 29:     // cache the result
> 30:     static private boolean isDumpLoadedClassList;

`isDumpLoadedClassList` is not gramatically correct. Also the field should be final. How about:

static final private boolean isDumpingClassList = isDumpingClassList0();
public static boolean isDumpingClassList() {
    return isDumpingClassList;
}
private static boolean isDumpingClassList0();

src/java.base/share/classes/jdk/internal/misc/CDS.java line 82:

> 80:      * log output to DumpLoadedClassList
> 81:      */
> 82:     public static void logTraceResolve(String line) {

`logTraceResolve` is too generic. How about `CDS.logLambdaFormInvoker()` to match the `@lambda-form-invoker` in the
classlist file?

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

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



More information about the build-dev mailing list