RFR: 8361520: Stabilize SystemGC benchmarks [v3]

Aleksey Shipilev shade at openjdk.org
Tue Jul 8 14:29:08 UTC 2025


> Noticed this while working on a related bug ([JDK-8359960](https://bugs.openjdk.org/browse/JDK-8359960)):
> 
> First, I see the benchmark executes a single shot per fork. As such, I believe the benchmark really tests the cost of initial GC, that probably drags a lot of (potentially non-benchmark-related) objects through new (possibly awkwardly wired, despite +AlwaysPreTouch) memory. The first iteration is 80 ms/op for me here, and the second one is -- whoosh -- only 3 ms/op! Second, the benchmark is really, really noisy. Part of it is due to first iteration being noisy, but also we want more samples to shrink the estimated errors.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `gc.systemgc` benchmark runs

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Revert accidental
 - Merge branch 'master' into JDK-8361520-stabilize-systemgc
 - Do System.gc() once at start
 - Revert accidental comment removal
 - Fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26182/files
  - new: https://git.openjdk.org/jdk/pull/26182/files/1e524119..bfafa46a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26182&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26182&range=01-02

  Stats: 1109 lines in 74 files changed: 602 ins; 129 del; 378 mod
  Patch: https://git.openjdk.org/jdk/pull/26182.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26182/head:pull/26182

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


More information about the hotspot-gc-dev mailing list