On Thu, 5 Mar 2026 07:54:16 GMT, Axel Boldt-Christmas <[email protected]>
wrote:
> For `IS_DEST_UNINITIALIZED` it would never be valid for the
> CardTableBarrierSet to do a pre-barrier. Currently `value_copy_in_heap` and
> `value_store_null_in_heap` both iterates the oops and virtually calls into
> the barriers sets pre barriers (of which all implementations are no-ops for
> uninitialized values).
>
> Remove this as part of the `CardTableBarrierSet` interface. After this is
> integrated I will upstream the relevant changes of this patch to mainline.
Thanks for doing this change! I have a style thought below:
src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp line 185:
> 183:
> 184: if (!HasDecorator<decorators, IS_DEST_UNINITIALIZED>::value) {
> 185: // Pre-barriers...
I'm wondering if the code doesn't read nicer if the comments were above the
condition:
Suggestion:
// Pre-barriers...
if (!HasDecorator<decorators, IS_DEST_UNINITIALIZED>::value) {
Then the two comments would be at the same "level" and it might be easier to
see the structure of the code:
// Pre-barriers...
conditional_pre_barrier_stuff
copy
// Post-barriers...
post_barrier_stuff
-------------
PR Review:
https://git.openjdk.org/valhalla/pull/2200#pullrequestreview-3896204695
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2200#discussion_r2889761066