RFR: Shenandoah string deduplication
Roman Kennke
rkennke at redhat.com
Wed Dec 6 19:48:57 UTC 2017
Am 06.12.2017 um 18:15 schrieb Zhengyu Gu:
> The implementation takes different approach from G1's implementation.
>
> * It treats string dedup queue/table as weak roots.
>
> * It identifies deduplication candidates during concurrent marking and
> during full gc, to reduce impact on pause time.
>
> * To properly identify the candidates, it manipulates string's age field
> concurrently, to prevent from processing string too early or
> deduplicating the same string over and over again. While it is
> undesirable, it reduces the risk by only manipulating *regular* strings
> - when they do not have displaced headers. Locked objects are relative
> rare, especially for immutable objects, such as Strings.
>
> * Deduplicate routine is implemented lock-free, in case we have to embed
> it in barriers.
>
> * Reverted all early changes to G1's implementation
>
> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/sh_strdedup/webrev.00/
>
> Test:
> hotspot_gc_shenandoah (fastdebug and release)
> specJBB (fastdebug and release)
>
>
> Thanks,
>
> -Zhengyu
src/hotspot/share/classfile/stringTable.cpp:
/me makes a note that this warrants a GC interface
Other than that, I like it! :-)
Probably warrants another pair of eyes.
Roman
More information about the shenandoah-dev
mailing list