RFR: 8267186: Add string deduplication support to ZGC

Erik Österlund eosterlund at openjdk.java.net
Fri Aug 6 13:09:28 UTC 2021


On Fri, 6 Aug 2021 10:03:05 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).

Now that we have a context object for marking, it would be nice if it also contained the stripes and stacks that we pass around everywhere, that we originally determine just the lines below where the context object is created.

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

Changes requested by eosterlund (Reviewer).

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



More information about the hotspot-gc-dev mailing list