RFR: 8255614: Shenandoah: Consolidate/streamline runtime LRBs

Roman Kennke rkennke at openjdk.java.net
Fri Oct 30 11:13:52 UTC 2020


Currently, our various LRB entry points are a mess, and quite inefficient too.
- We have three entry points, one is checking for null, and calls a non-null version, but that checks for null again
- We don't have to check for null at all: it can be subsumed in the cset-check
- The LRB resolves forwardee even though has_forwarded_objects() and in_cset() has not been checked
- The LRB entry is not inlineable

The proposed change coalesces the 3 entries into one, moves it to shenandoahBarrierSet.inline.hpp and make it inlineable, rearranges the impl to allow cset-check to subsume the NULL-check. As a bonus, it pushes the NULL-check around keep-alive down after the (compile-time) check for weak-ref, so that this path becomes a no-op in the majority of cases.

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

Commit messages:
 - 8255614: Shenandoah: Consolidate/streamline runtime LRBs

Changes: https://git.openjdk.java.net/jdk/pull/953/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=953&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255614
  Stats: 105 lines in 7 files changed: 36 ins; 51 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/953.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/953/head:pull/953

PR: https://git.openjdk.java.net/jdk/pull/953


More information about the shenandoah-dev mailing list