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

Per Liden pliden at openjdk.java.net
Fri Aug 6 14:11:57 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).

Per Liden has updated the pull request incrementally with one additional commit since the last revision:

  Review comments from Erik

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5029/files
  - new: https://git.openjdk.java.net/jdk/pull/5029/files/5b258cb0..c8cd63ee

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5029&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5029&range=00-01

  Stats: 96 lines in 5 files changed: 36 ins; 38 del; 22 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