RFR: 8344665: Refactor PartialArrayState allocation for reuse [v2]
Kim Barrett
kbarrett at openjdk.org
Sat Nov 30 10:59:41 UTC 2024
On Fri, 29 Nov 2024 19:17:16 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> What about using a union/struct instead of all that manual masking and shifting?
>>
>> I agree that encoding them in this way should give a rationale for that.
>
> I tried using some combination of union/struct a couple of different ways, but
> the the result seemd significantly worse than what I published. But some
> simplifications since those attempts, plus an idea for a different way of
> structuring things, and I've now got something union/struct-based that seems
> better.
>
> It could be slightly further improved in syntax if I was willing to drop the
> CounterState::_cf member name and make it an anonymous struct. That's a C11
> feature that is provided as a C++ extension by all of our supported compilers.
>
> You might not want to look at the difference between the two commits very
> much, but instead look at the updated complete change.
I also expanded commentary for `PartialArrayStateManager::_counters`. Maybe that will help?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22287#discussion_r1864216818
More information about the hotspot-gc-dev
mailing list