RFR: 8292914: Drop the counter from lambda class names [v6]
Brian Goetz
briangoetz at openjdk.org
Sat Feb 18 19:16:24 UTC 2023
On Fri, 17 Feb 2023 02:11:10 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> David M. Lloyd has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use a unique index for the dumped lambda class instead of a time stamp
>
> `this_class` in the classbyte is shown in the VM logging (`-Xlog:class+nestmates=debug`). It'd be helpful if it can easily correlate to the dumped file. For example, 3 lambda proxy classes of the same name of `this_class` but they are unique hidden classes.
>
>
> 0.058s][info ][class,nestmates] LookupDefineClass: jdk/internal/module/DefaultRoots$$Lambda$ - with dynamic nest-host jdk.internal.module.DefaultRoots, hidden, strong, with vm annotations
> [0.058s][debug][class,nestmates] Dynamic nestmate: java.base/jdk.internal.module.DefaultRoots$$Lambda$/0x000000080000a970, nest_host jdk.internal.module.DefaultRoots, is hidden
> [0.062s][info ][class,nestmates] LookupDefineClass: jdk/internal/module/DefaultRoots$$Lambda$ - with dynamic nest-host jdk.internal.module.DefaultRoots, hidden, strong, with vm annotations
> [0.062s][debug][class,nestmates] Dynamic nestmate: java.base/jdk.internal.module.DefaultRoots$$Lambda$/0x000000080000b998, nest_host jdk.internal.module.DefaultRoots, is hidden
> [0.068s][info ][class,nestmates] LookupDefineClass: jdk/internal/module/DefaultRoots$$Lambda$ - with dynamic nest-host jdk.internal.module.DefaultRoots, hidden, strong, with vm annotations
> [0.068s][debug][class,nestmates] Dynamic nestmate: java.base/jdk.internal.module.DefaultRoots$$Lambda$/0x000000080000c0b0, nest_host jdk.internal.module.DefaultRoots, is hidden
>
>
> What about keeping your original idea - the filename matching the hidden class name if successfully defined. If it fails at `defineHiddenClass` time, use `lambdaClassName` + counter?
>
> Also, `test/jdk/java/lang/StackWalker/VerifyStackTrace.java` tests need update because of the lambda proxy class name change.
This looks pretty reasonable to me. As long as @mlchung and @iklam are happy, no objections from me.
-------------
PR: https://git.openjdk.org/jdk/pull/12579
More information about the core-libs-dev
mailing list