RFR: 8308463: Refactor regenerated class handling in lambdaFormInvokers.cpp
Coleen Phillimore
coleenp at openjdk.org
Wed Jun 21 00:33:05 UTC 2023
On Wed, 21 Jun 2023 00:00:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> The handling of regenerated classes need to be refactored to enable future development:
>
> - Improve the API to access the regenerated classes and their methods
> - Allow more classes to be regenerated, not just the Lambda Form invokers. Therefore, the code is moved to a new file cds/regeneratedClasses.cpp
>
>
> Please see the bug report [JDK-8308463](https://bugs.openjdk.org/browse/JDK-8308463) for motivation of this PR.
I have some style comments. I don't know what regenerated classes are.
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?
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?
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?
-------------
PR Review: https://git.openjdk.org/jdk/pull/14573#pullrequestreview-1489284446
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1236028593
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1236029684
PR Review Comment: https://git.openjdk.org/jdk/pull/14573#discussion_r1236030250
More information about the hotspot-runtime-dev
mailing list