RFR: 8322815: Eliminate -Wparentheses warnings in shenandoah code
Aleksey Shipilev
shade at openjdk.org
Wed Jan 3 11:53:45 UTC 2024
On Tue, 2 Jan 2024 06:01:07 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 8322815: Eliminate -Wparentheses warnings in shenandoah code
>
> Please review this change to eliminate some -Wparentheses warnings. This
> involved simply adding a few parentheses to make some implicit operator
> precedence explicit.
>
> Testing: local (linux-x64) build with shenandoah included and ran
> hotspot:tier1 with -XX:+UseShenandoahGC.
Marked as reviewed by shade (Reviewer).
src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp line 710:
> 708: ShenandoahHeap::atomic_update_oop(resolved, p, obj);
> 709: assert(_heap->cancelled_gc() ||
> 710: (_mark_context->is_marked(resolved) && !_heap->in_collection_set(resolved)),
The change for this PR seems fine, but the whole assert looks weird, and lacks richer diagnostics Shenandoah asserts do. I believe the forwardee is explicitly marked, given it is a new copy after TAMS. So the whole thing might be just:
shenandoah_assert_not_in_cset_except(p, resolved, _heap->cancelled_gc());
Right, @zhengyu123? We should do that in separate PR.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17214#pullrequestreview-1801858321
PR Review Comment: https://git.openjdk.org/jdk/pull/17214#discussion_r1440366569
More information about the hotspot-gc-dev
mailing list