RFR: 8260309: Shenandoah: Clean up ShenandoahBarrierSet

Roman Kennke rkennke at openjdk.java.net
Fri Jan 29 14:34:57 UTC 2021


We collected some cruft in ShenandoahBarrierSet. Time to clean it up. 

This fixes/removes a number of includes, fixes some comments and it also removes is_a() and is_aligned() which look like leftovers/requirements from earlier incarnations of the superclass BarrierSet. Using the override keyword would be useful for such situations (btw, are we ok to start using override, nullptr, auto etc in Shenandoah, or do we want to keep it C++ for backporting ease?)

One thing I was not sure about is the ShenandoahHeap* _heap field. Making it const will likely help the compiler avoid repeated access (e.g. in a number of perf-critical paths like the LRB impl). However, maybe we should get rid of the field altogether and make it explicitely using ShenandoahHeap::heap() and avoid repeated access instead of helping the compiler and hoping for the best?

Testing:
 - [x] hotspot_gc_shenandoah release, fastdebug

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

Commit messages:
 - 8260309: Shenandoah: Clean up ShenandoahBarrierSet

Changes: https://git.openjdk.java.net/jdk/pull/2202/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2202&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260309
  Stats: 32 lines in 6 files changed: 3 ins; 21 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2202.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2202/head:pull/2202

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


More information about the shenandoah-dev mailing list