RFR(M) 8203641: Refactor String Deduplication into shared
rkennke at redhat.com
Fri Jun 1 19:58:06 UTC 2018
Am 28.05.2018 um 23:11 schrieb Zhengyu Gu:
> 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
> 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
> Bug: https://bugs.openjdk.java.net/browse/JDK-8203641
> Webrev: http://cr.openjdk.java.net/~zgu/8203641/webrev.00/index.html
> Submit test came back clean.
This change looks good to me. Thank you! Should wait a bit for G1
engineers to comment too.
More information about the hotspot-dev