RFR: 8251358: Clean up Access configuration after Shenandoah barrier change [v2]

Aleksey Shipilev shade at openjdk.java.net
Thu Sep 24 06:05:56 UTC 2020


On Wed, 23 Sep 2020 01:13:08 GMT, Aditya Mandaleeka <adityam at openjdk.org> wrote:

>> This change removes a bunch of code that is no longer necessary after the Shenandoah barrier changes, including the
>> `SUPPORT` macros in barrierSetConfig.hpp and code using them. `Access::resolve` and associated code have also been
>> removed, and callers have been modified.  Testing done:
>> tier1
>> hotspot_gc_shenandoah
>
> Aditya Mandaleeka 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 two additional commits
> since the last revision:
>  - Remove redundant _raw functions.
>  - 8251358: Clean up Access configuration after Shenandoah barrier change

No, wait a second. I agree with some `_raw` removals, but not the other. The point of many `_raw` calls is using them
from internal GC code when we *know* barriers are not required (because GC already knows in which state the object is
in) or even correct to perform (for example, setting marks on incomplete objects). Changing e.g. `set_mark_raw` to
`set_mark` on those paths exposes objects to GC barriers.

src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp line 74:

> 72:   assert(obj_addr != destination, "everything in this pass should be moving");
> 73:   Copy::aligned_conjoint_words(obj_addr, destination, size);
> 74:   oop(destination)->init_mark();

For example, here.

src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp line 51:

> 49:           // Clear bitmap and fix mark word.
> 50:           _bitmap->clear(obj);
> 51:           obj->init_mark();

For example, here.

src/hotspot/share/gc/parallel/psPromotionLAB.cpp line 86:

> 84:   HeapWord* tlab_end = end() + filler_header_size;
> 85:   typeArrayOop filler_oop = (typeArrayOop) top();
> 86:   filler_oop->set_mark(markWord::prototype());

...or here.

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

Changes requested by shade (Reviewer).

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


More information about the shenandoah-dev mailing list