RFR: 8276789: Support C++ lambda in ResourceHashtable::iterate [v4]

Ioi Lam iklam at openjdk.java.net
Thu Jun 2 17:47:41 UTC 2022


On Wed, 1 Jun 2022 20:17:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   some clean up suggested by @stefank
>
> src/hotspot/share/cds/dumpTimeClassInfo.inline.hpp line 76:
> 
>> 74:     return iter->do_entry(k, v);
>> 75:   };
>> 76:   iterate(function);
> 
> I don't understand this wrapper level.  Why doesn't this call into the resourceHashtable::iterate function directly?  Same with the iterate_all function?

I renamed the functions to `DumpTimeSharedClassTable::iterate_all_live_classes()` to disambiguate them from the `ResourceHashtable::iterate/_all` functions.

> src/hotspot/share/classfile/systemDictionaryShared.cpp line 665:
> 
>> 663:     ResourceMark rm;
>> 664:     UnregisteredClassesDuplicationChecker dup_checker;
>> 665:     _dumptime_table->iterate(&dup_checker);
> 
> Which iterate function does this call?

I changed it to `_dumptime_table->iterate_all_live_classes()`

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

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


More information about the hotspot-dev mailing list