RFR(M) 8203641: Refactor String Deduplication into shared

Zhengyu Gu zgu at redhat.com
Mon May 28 21:11:06 UTC 2018


Hi,

Please review this refactoring of G1 string deduplication into shared 
directory, so that other GCs (such as Shenandoah) can advantage of 
existing infrastructure and plugin their own implementation.

This refactoring preserves G1's String Deduplication infrastructure 
(please see the comments in stringDedup.hpp for details), so that there 
is no change to G1 outside of string deduplication code.

Following changes are made to support different GCs:

1. Allows plugin new dedup queue implementation.
    While it keeps G1's dedup queue static interface, queue itself now 
is a pure virtual class. Different GC can provide different 
implementation to fit its own enqueuing mechanism.
    For example, G1 enqueues deduplication candidates during STW 
evacuate/mark pause, while Shenandoah implementation does it during 
concurrent mark.

2. Abstracted out generation related statistics out of StringDedupStat 
base class, cause not all GCs are generational.
    G1StringDedupStat simply extends the base to add generational 
statistics.

3. Moved table and queue's parallel processing logic from closure 
(StringDedupUnlinkOrOopsDoClosure) to corresponding table and queue. 
This gives flexibility to construct closure to share among the workers 
(as G1 does), as well as private closure for each worker (as Shenandoah 
does).


Bug: https://bugs.openjdk.java.net/browse/JDK-8203641
Webrev: http://cr.openjdk.java.net/~zgu/8203641/webrev.00/index.html

Test:

   Submit test came back clean.

Thanks,

-Zhengyu




More information about the hotspot-dev mailing list