RFR: 8299614: Shenandoah: STW mark should keep nmethod/oops referenced from stack chunk alive

Aleksey Shipilev shade at openjdk.org
Mon Sep 11 18:28:02 UTC 2023


See the investigation in the bug. Basically, with Loom we have to enable nmethod barriers to get the proper marking of nmethods/oops from stack chunks. See `ShenandoahMarkRefsSuperClosure::do_nmethod` callers and callees for more details. This IMO makes `ShenandoahNMethodBarrier` flag non-optional, as we have to enable nmethod barriers when Loom is enabled. The major part of PR deals with that.

Additional testing:
 - [x] Original reproducer does not fail anymore
 - [x] MacOS AArch64 fastdebug, `hotspot_gc_shenandoah`
 - [x] Linux AArch64 fastdebug, `hotspot_gc_shenandoah`
 - [x] Linux x86_64 fastdebug, `hotspot_gc_shenandoah`
 - [ ] Linux AArch64 fastdebug, `tier1 tier2 tier3` with `-XX:+UseShenandoahGC`
 - [ ] Linux x86_64 fastdebug, `tier1 tier2 tier3` with `-XX:+UseShenandoahGC`

-------------

Commit messages:
 - ShenandoahNMethodBarrier flag is no longer optional
 - Fix

Changes: https://git.openjdk.org/jdk/pull/15669/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15669&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299614
  Stats: 56 lines in 15 files changed: 26 ins; 17 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/15669.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15669/head:pull/15669

PR: https://git.openjdk.org/jdk/pull/15669


More information about the hotspot-gc-dev mailing list