RFR: 8315247: GenShen: Condition calls to post-write barrier code generation by a flag [v3]

Y. Srinivas Ramakrishna ysr at openjdk.org
Tue Aug 29 23:00:08 UTC 2023


> Protect the card barrier code generation by a new global `ShenandoahCardBarrier`, which is disabled by default and enabled for GenShen (generational mode Shenandoah) only. If the user forces the barrier flag to a value inconsistent with mode, we exit with an appropriate error message.
> 
> The intention of the change is two-fold:
> 1. Make the card-barrier code in support of GenShen more idiomatic along the lines of existing barrier-gen code in Shenandoah
> 2. Reduce and simplify to the extent possible the impact of changes from GenShen on shared/legacy Shenandoah code, so as to make reviews/audits of shared/legacy code a bit easier
> 
> The changes have been made for x86, aarch, and ppc, and tested as follows:
> 1. I have tested on x86 on a cloud host running jtreg1-4 and SPECjbb.
> 3. A round of aarch64 and x86 pipeline tests have run (but ran into existing assertion that William is fixing).
> 4. Many thanks to Martin Doerr (SAP) for putting this through a "quick spin" on PPC
> 5. RISC-V & S390 don't currently support generational mode Shenandoah.

Y. Srinivas Ramakrishna has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:

 - Merge branch 'master' into card_barrier
 - Elaborate ShenandoahCardBarrier documentation a bit.
 - Merge branch 'master' into card_barrier
 - Check and exit if user specifies a setting of ShenandoahCardBarrier that
   conflicts with ShenandoahGCMode.
 - check that ShenandoahCardBarrier is off by default for most
   configurations. Exit with an error message if the user tries to change
   it.
 - Changes from prelim review by William & Kelvin.
 - Take care of some ppc changes
 - Merge branch 'master' into card_barrier
 - First cut of changes, checking in for testing:
   test at caller of post-write-barrier for ShenandoahCardBarrier, and
   assert in post-barrier/generation code that we are in generational mode.

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

Changes:
  - all: https://git.openjdk.org/shenandoah/pull/313/files
  - new: https://git.openjdk.org/shenandoah/pull/313/files/8fb05b2c..61d264dc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=shenandoah&pr=313&range=02
 - incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=313&range=01-02

  Stats: 110 lines in 8 files changed: 42 ins; 49 del; 19 mod
  Patch: https://git.openjdk.org/shenandoah/pull/313.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/313/head:pull/313

PR: https://git.openjdk.org/shenandoah/pull/313


More information about the shenandoah-dev mailing list