RFR: String deduplication for traversal GC

Roman Kennke rkennke at redhat.com
Tue Jan 30 19:46:16 UTC 2018


Am 30.01.2018 um 20:40 schrieb Zhengyu Gu:
> Please review the implementation of string deduplication for traversal GC.
> 
> 
> Webrev: 
> http://cr.openjdk.java.net/~zgu/shenandoah/traversal_dedup/webrev.00/
> 
> 
> Test:
> 
>    hotspot_gc_shenandoah (fastdebug + release)
>    specJVM with -XX:+UseStringDeduplication (fastdebug)
> 
> 
> Thanks,
> 
> -Zhengyu

I wonder if it should be possible to make the closure templated instead 
of making multiple explicit classes, like this:

template <bool STRDEDUP>
class ShenandoahTraversalSuperClosure .. {

..
    template <class T>
    void work(T* p);
}

and then something like:

template <bool STRDEDUP>
class ShenandoahTraversalDedupClosure : public 
ShenandoahTraversalSuperClosure<STRDEDUP> {

I am not totally sure about how to stitch it together, but something 
like this should work? Or maybe it's not worth all the hassle. ?

(Infact, I suspect something like the above would be possible for the 
metadata flag too...)

Roman


More information about the shenandoah-dev mailing list