RFR: 8261743: Shenandoah: enable String deduplication with compact heuristics

Rui Li duke at openjdk.org
Thu Nov 6 01:45:26 UTC 2025


Enable `UseStringDeduplication` when using compact heuristics.

Testing:

./build/macosx-aarch64-server-release/images/jdk/bin/java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=compact -XX:+PrintFlagsFinal --version | grep UseStringDeduplication
     bool UseStringDeduplication                   = true                                      {product} {default}


Note: The label should be `{product} {ergonomic}` in theory. Pending on a separate issue: [JDK-8371381](https://bugs.openjdk.org/browse/JDK-8371381)

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

Commit messages:
 - 8261743: Shenandoah: enable String deduplication with compact heuristics

Changes: https://git.openjdk.org/jdk/pull/28170/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28170&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8261743
  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28170.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28170/head:pull/28170

PR: https://git.openjdk.org/jdk/pull/28170


More information about the hotspot-gc-dev mailing list