RFR: Eliminating string dedup dependency on the second bitmap

Zhengyu Gu zgu at redhat.com
Fri Oct 27 17:15:50 UTC 2017


> 
>     typeArrayOop obj() {
> - return _obj;
> + return typeArrayOop(oopDesc::bs()->read_barrier(_obj));
>     }
>   
>     typeArrayOop* obj_addr() {
>       return &_obj;
>     }
>   
>     void set_obj(typeArrayOop obj) {
> - _obj = obj;
> + _obj = typeArrayOop(oopDesc::bs()->write_barrier(obj));
>     }
> 
> 
> You're not reading/writing anything *to* the object. Therefore it looks wrong to do those barriers there.
> 
> +class ShenandoahEvacuateUpdateRefsClosure: the sounds like it may clash 
> with something that already exists. Can you check that? Romn
> 

String Dedup table holds byte array oops, somewhat likes roots, but not 
be scanned during marking, their reachability depend on the strings 
referring them.

When a new byte array oop is added to the table, you have to make sure 
it is to-space oop, otherwise, it can be trashed.

I agree, that we may not need read barrier, since we applied keep_alive 
barrier if string is dedup.

I will test without read barrier, but I do think write barrier is 
necessary here.

We already have ShenandoahEvacuateUpdateRootsClosure, but not 
ShenandoahEvacuateUpdateRefsClosure.

Thanks,

-Zhengyu



More information about the shenandoah-dev mailing list