RFR: 8267186: Add string deduplication support to ZGC

Per Liden pliden at openjdk.java.net
Fri Aug 6 10:10:46 UTC 2021


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).

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

Commit messages:
 - 8267186: Add string deduplication support to ZGC
 - ZGC: Introduce ZMarkContext

Changes: https://git.openjdk.java.net/jdk/pull/5029/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5029&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267186
  Stats: 231 lines in 12 files changed: 211 ins; 1 del; 19 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5029.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5029/head:pull/5029

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



More information about the hotspot-gc-dev mailing list