RFR: 8267186: Add string deduplication support to ZGC [v2]

Erik Österlund eosterlund at openjdk.java.net
Fri Aug 6 14:26:31 UTC 2021


On Fri, 6 Aug 2021 14:11:57 GMT, Per Liden <pliden at openjdk.org> wrote:

>> This change adds support for string deduplication to ZGC. It's a pretty straight forward change, but to make reviewing even easier it is broken up into two commits:
>> 
>> __ZGC: Introduce ZMarkContext__
>> This commit just moves the `ZMarkCache` into the new `ZMarkContext` class, and we now pass a `ZMarkContext*` around instead of a `ZMarkCache*`. The `ZMarkContext` class is a more general container for worker-local data, which in the next commit will be extended to also include the `StringDedup::Requests` queue.
>> 
>> __8267186: Add string deduplication support to ZGC__
>> This commits adds the actual string dedup functionality and enables relevant tests. We use the `deduplication_requested` bit in the `String` object to filter out `Strings` we've already attempted to deduplicate.
>> 
>> Testing:
>> - Passes all string dedup tests.
>> - Passes Tier1-7 with ZGC on Linux/x86_64 (with -XX:+UseStringDeduplication enabled by default to get better exposure).
>
> Per Liden has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments from Erik

Looks good.

-------------

Marked as reviewed by eosterlund (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5029



More information about the hotspot-gc-dev mailing list