RFR: Fix ExtendedDTraceProbes with Shenandoah

Zhengyu Gu zgu at redhat.com
Fri Sep 21 01:29:34 UTC 2018


Passed most tier2 with ExtendedDTraceProbes (some of tests timeout).  Of 
course, still failed CriticalNativeArgs.java with C2/traversal.

Thanks,

-Zhengyu

On 09/20/2018 04:52 PM, Roland Westrelin wrote:
> 
> Below is a possible fix.
> 
> Roland.
> 
> diff --git a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp
> --- a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp
> +++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp
> @@ -301,6 +301,8 @@
>     if (gen_pre_barrier) {
>       // We can have generate one runtime check here. Let's start with
>       // the offset check.
> +    LIR_Opr base_reg = gen->new_register(T_OBJECT);
> +    __ move(base.result(), base_reg);
>       if (gen_offset_check) {
>         // if (offset != referent_offset) -> continue
>         // If offset is an int then we can do the comparison with the
> @@ -323,14 +325,14 @@
>       if (gen_source_check) {
>         // offset is a const and equals referent offset
>         // if (source == null) -> continue
> -      __ cmp(lir_cond_equal, base.result(), LIR_OprFact::oopConst(NULL));
> +      __ cmp(lir_cond_equal, base_reg, LIR_OprFact::oopConst(NULL));
>         __ branch(lir_cond_equal, T_OBJECT, cont->label());
>       }
>       LIR_Opr src_klass = gen->new_register(T_METADATA);
>       if (gen_type_check) {
>         // We have determined that offset == referent_offset && src != null.
>         // if (src->_klass->_reference_type == REF_NONE) -> continue
> -      __ move(new LIR_Address(base.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), src_klass);
> +      __ move(new LIR_Address(base_reg, oopDesc::klass_offset_in_bytes(), T_ADDRESS), src_klass);
>         LIR_Address* reference_type_addr = new LIR_Address(src_klass, in_bytes(InstanceKlass::reference_type_offset()), T_BYTE);
>         LIR_Opr reference_type = gen->new_register(T_INT);
>         __ move(reference_type_addr, reference_type);
> 


More information about the shenandoah-dev mailing list