RFR(M) 8203641: Refactor String Deduplication into shared

Zhengyu Gu zgu at redhat.com
Fri Jun 8 12:06:22 UTC 2018

Ping! Could any G1 experts review this refactoring?



On 06/01/2018 03:58 PM, Roman Kennke wrote:
> Am 28.05.2018 um 23:11 schrieb Zhengyu Gu:
>> 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.
> This change looks good to me. Thank you! Should wait a bit for G1
> engineers to comment too.
> Roman

More information about the hotspot-dev mailing list