RFR: 8308463: Refactor regenerated class handling in lambdaFormInvokers.cpp [v2]
Ioi Lam
iklam at openjdk.org
Thu Jun 22 03:52:29 UTC 2023
On Wed, 21 Jun 2023 00:25:46 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - @dholmes-ora comments
>> - @coleenp review comments
>
> src/hotspot/share/cds/archiveBuilder.hpp line 145:
>
>> 143: }
>> 144: }
>> 145: SourceObjInfo(address src, address buf) {
>
> This doesn't initialize all the fields, and should use initialization syntax. Could you make one of these constructors call a common one that zeros out the other fields?
I cleaned up this constructor and added comments.
> src/hotspot/share/cds/regeneratedClasses.cpp line 75:
>
>> 73:
>> 74: void RegeneratedClasses::record_regenerated_objects() {
>> 75: if (_renegerated_objs != nullptr) {
>
> Does the DumpTimeTable_lock protect regenerated_objs also?
This function is called inside a safepoint and can't lock DumpTimeTable_lock. I added `assert(SafepointSynchronize::is_at_safepoint()` instead.
> src/hotspot/share/cds/regeneratedClasses.hpp line 38:
>
>> 36: using RegeneratedObjTable = ResourceHashtable<address, address, 15889, AnyObj::C_HEAP, mtClassShared>;
>> 37: static RegeneratedObjTable* _renegerated_objs; // InstanceKlass* and Method*
>> 38: static GrowableArrayCHeap<OopHandle, mtClassShared>* _regenerated_mirrors;
>
> Since these are private, and not used by the argument, do they need to be in the header file?
I moved them to the cpp file.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1237957861
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1237957740
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1237957331
More information about the hotspot-runtime-dev
mailing list