Integrated: 8304846: Provide a shared utility to dump generated classes defined via Lookup API
Mandy Chung
mchung at openjdk.org
Tue Apr 4 18:10:25 UTC 2023
On Fri, 24 Mar 2023 20:41:41 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> This implements a shared utility to dump generated classes defined as normal/hidden classes via `Lookup` API. This replaces the implementation in `LambdaMetaFactory` and method handle implementation that dumps the hidden class bytes on disk for debugging.
>
> For classes defined via `Lookup::defineClass`, `Lookup::defineHiddenClass` and `Lookup::defineHiddenClassWithClassData`, by default they will be dumped to the path specified in `-Djava.lang.invoke.Lookup.dumpClasses=<dumpDir>`
>
> The hidden classes generated for lambdas, `LambdaForms` and method handle implementation use non-default dumper so that they can be controlled via a separate system property and path as in the current implementation.
>
> To dump lambda proxy classes, set this system property:
> -Djdk.internal.lambda.dumpProxyClasses=<dumpDir>
>
> To dump LambdaForms and method handle implementation, set this system property:
> -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true
>
> P.S. `ProxyClassesDumper` is renamed to `ClassFileDumper` but for some reason, it's not shown as rename.
This pull request has now been integrated.
Changeset: dd594717
Author: Mandy Chung <mchung at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/dd59471798ad0118481939c59e58eca18e4365d1
Stats: 740 lines in 11 files changed: 347 ins; 300 del; 93 mod
8304846: Provide a shared utility to dump generated classes defined via Lookup API
Reviewed-by: jvernee
-------------
PR: https://git.openjdk.org/jdk/pull/13182
More information about the core-libs-dev
mailing list