RFR (11): [backport] 8221766: Load-reference barriers for Shenandoah

Roman Kennke rkennke at redhat.com
Fri May 31 19:39:39 UTC 2019


>> This is the backport of load-reference-barriers to sh/jdk11. It goes on
>> top of the recently proposed (and not-yet-pushed) CAS streamlining.
>>
>> It is a tremendous harmonization in the C1 and C2 barriers sets: I
>> basically copied over the relevant files from jdk/jdk at the point of
>> the Load-ref-barriers-change, and retrofitted it to match jdk11.
>>
>> I have *not* yet backported the LRB-related-bugfixes, yet. Let's start
>> review on this here, while I'll pile on the followup-bugfixes in the
>> meantime.
>>
>> I also went over the sh/jdk11 vs. upstream jdk11u diff and reverted any
>> change that's not needed anymore (resolve() and equals() stuff for the
>> most part). It is *much* nicer now. :-) Notably, it makes
>> oopDesc::unsafe_equals() disappear, and we should do the equivalent in
>> jdk/jdk to match it.
> 
> Yeah, and I have a bit of reservation about that, seeing the stuff that is changed. It is probably
> fine to include in LRB backport, as it would be the jdk11u-specific (and later jdk8u-specific)
> change later anyway.

Yeah, I wasn't sure either.

>> http://cr.openjdk.java.net/~rkennke/backport-jdk11-JDK-8221766/webrev.00/
> 
> First look:
> 
> *) src/hotspot/share/ci/ciObjectFactory.cpp
>   I don't see sh/jdk11 change that needs to be reverted...

Oops, I accidentally changed that. Will remove it in next patch.

> *) src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp
>   This is needed why? I don't see it used in Shenandoah code anywhere. There is a definition in
> src/hotspot/share/gc/shared/c1/barrierSetC1.cpp, though.
> 
>   34 #ifndef PATCHED_ADDR
>   35 #define PATCHED_ADDR  (max_jint)
>   36 #endif


Uh, dunno. This came from jdk/jdk version. Should be removed from there
and then trickle down?

> *) src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.hpp
>  This breaks Solaris. (also, see other enums?)
> 
>   47     ShenandoahNone,
>   48   };

Arg, this happened because I copied from pre-Solaris change. Will fix.

> *) src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp
>  This thing looks like the accidental backport of pre-evac-ing all roots.

Yes, but some of it was part of original LRB change, and the rest is
needed to make it work (e.g. the CLD evacing, because jdk11 doesn't have
the barrier hooks to deal with CLD otherwise).

> *) src/hotspot/share/opto/mulnode.cpp
>  This does not seem related to LRB all that much. We'd need to see if matcher still matches
> fastpaths right.

Hmm, right. Will revert.

Will compile the changes later this weekend and post new webrev then.

Thanks for looking!

Roman



More information about the shenandoah-dev mailing list