RFR: Simplify crossing map implementation

William Kemper wkemper at openjdk.java.net
Tue Feb 1 21:33:39 UTC 2022


On Tue, 1 Feb 2022 21:11:28 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> The crossing map maintains a record of the first and last objects
> starting within each remembered set card's range of memory addresses.
> The previous implementations used bit-shifts.  It was detected during
> testing that the c++ compiler was emitting incorrect code in certain
> in-line expansions of the register_object() method.  gdb reports that
> there are 56 distinct contexts holding the expansion of this function.
> This simplified implementation does not exhibit the same broken
> behavior.

src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp line 570:

> 568:   ~ShenandoahCardCluster() {
> 569:     if (object_starts != nullptr)
> 570:       free(object_starts);

I know `ShenandoahCardCluster` is a singleton so this is a nit pick, but we should set `object_starts` to `nullptr` here to avoid double deletes.

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

PR: https://git.openjdk.java.net/shenandoah/pull/107


More information about the shenandoah-dev mailing list