RFR: 8373054: Shenandoah: Remove unnecessary BarrierSetNMethod::arm in shenandoahCodeRoots
William Kemper
wkemper at openjdk.org
Wed Dec 3 21:42:56 UTC 2025
On Wed, 3 Dec 2025 21:33:50 GMT, Ben Taylor <btaylor at openjdk.org> wrote:
> The call to arm is redundant, and can be replaced with an assert to ensure the precondition remains true.
>
> The same set of tier1 tests pass before and after this change with a fastdebug and Shenandoah GC.
Let's change the misleading comment.
src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp line 147:
> 145: ShenandoahReentrantLocker locker(nm_data->lock());
> 146:
> 147: // Heal oops and disarm
Suggestion:
// Heal oops and leave the nmethod armed because code cache unloading needs to know about on-stack nmethods.
-------------
Changes requested by wkemper (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28648#pullrequestreview-3537029053
PR Review Comment: https://git.openjdk.org/jdk/pull/28648#discussion_r2586693272
More information about the shenandoah-dev
mailing list