RFR: 8344665: Refactor PartialArrayState allocation for reuse [v2]
Albert Mingkun Yang
ayang at openjdk.org
Thu Nov 28 15:33:40 UTC 2024
On Thu, 28 Nov 2024 10:50:51 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>>
>> simplify pas allocator destruction and manager phase tracking
>
> src/hotspot/share/gc/shared/partialArrayState.hpp line 185:
>
>> 183: // - low half: allocators constructed
>> 184: // - high half: allocators destructed (debug only)
>> 185: volatile CounterState _counters;
>
> Seems like a lot of code overhead to accomodate debugging! However, if there is no easier approach, then not a blocker for me.
I feel the motivation for this encoding is missing from this PR. It's not immediately clear why these two counters need to be combined in this way. Kim outlined some rationale during our offline discussion, but for the benefit of other reviewers and future readers of this code, this rationale should be documented alongside the encoding. Having those arguments written down would help assess whether the additional complexity is justified.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22287#discussion_r1862392159
More information about the hotspot-gc-dev
mailing list