RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]
Mandy Chung
mchung at openjdk.org
Mon Apr 3 19:29:02 UTC 2023
On Mon, 3 Apr 2023 18:13:54 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> set -D<key> or -D<key>=true will enable dumping
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2536:
>
>> 2534: }
>> 2535: } else {
>> 2536: name += ".failed-" + dumper.incrementAndGetCounter();
>
> I think it makes more sense to move the counter to `ClassDefiner`. It is not used by `ClassFileDumper` itself.
>
> (make it `static` if it's possible to have multiple definer instances with the same class name)
I see your point. If it were a static counter for all dumpers, multiple`.failed-xxx` dumped by a single dumper may not be in sequence if other dumpers have `.failed-xxx` class files.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13182#discussion_r1156371958
More information about the core-libs-dev
mailing list