RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API

Mandy Chung mchung at openjdk.org
Mon Mar 27 17:06:31 UTC 2023


On Sun, 26 Mar 2023 18:41:12 GMT, Brian Goetz <brian.goetz at oracle.com> wrote:

> Since LMF goes through Lookup::defineHiddenClass, does this mean that they will be potentially dumped twice, once through Lookup, and once through LMF?

No, only once.  The old dumping code in LMF is removed.

> Now that there is a shared implementation, perhaps we should migrate use in LMF to something more like
> 
> -Djava.lang.invoke.MethodHandle.DUMP_LAMBDA_PROXY_CLASS_FILES=true
> 
> and retire the separate dumpProxyClasses flag.

+1.   I think it's simpler to use a boolean property and dump to a known directory.

As this is implementation-specific, I will rename the property name with `jdk.` prefix.

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

PR Comment: https://git.openjdk.org/jdk/pull/13182#issuecomment-1485516316


More information about the core-libs-dev mailing list