RFR: 8346470: Improve WriteBarrier JMH to have old-to-young refs [v2]
Eric Caspole
ecaspole at openjdk.org
Thu Mar 13 15:53:43 UTC 2025
> Adds new cases based on the existing ones using an extra iteration setup to allocate into young gen, allowing to test old-to-young stores etc, where the existing code is all old-to-old.
>
> Here is a run on a standard OCI A1.160 with JDK 25:
>
> Benchmark Mode Cnt Score Error Units
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathNullLarge avgt 12 3448.826 ± 1.620 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathNullSmall avgt 12 63.740 ± 0.151 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathNullYoungLarge avgt 12 3448.353 ± 0.860 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathNullYoungSmall avgt 12 63.565 ± 0.132 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathOldToYoungLarge avgt 12 4476.390 ± 0.930 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathOldToYoungSmall avgt 12 73.517 ± 0.082 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathRealLarge avgt 12 3103.911 ± 2.079 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathRealSmall avgt 12 57.549 ± 0.512 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathYoungToOldLarge avgt 12 9587.762 ± 2.044 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathYoungToOldSmall avgt 12 157.244 ± 0.169 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathYoungToYoungLarge avgt 12 3103.191 ± 1.100 ns/op
> WriteBarrier.WithDefaultUnrolling.testArrayWriteBarrierFastPathYoungToYoungSmall avgt 12 57.392 ± 0.624 ns/op
> WriteBarrier.WithDefaultUnrolling.testFieldWriteBarrierFastPath avgt 12 2.668 ± 0.001 ns/op
> WriteBarrier.WithDefaultUnrolling.testFieldWriteBarrierFastPathYoungRef avgt 12 9.337 ± 0.001 ns/op
> WriteBarrier.WithoutUnrolling.testArrayWriteBarrierFastPathNullLarge avgt 12 3449.234 ± 1.840 ns/op
> WriteBarrier.WithoutUnrolling.testArrayWriteBarrierFastPathNullSmall avgt 12 63.720 ± 0.079 ns/op
> WriteBarrier.WithoutUnrolling.testArrayWriteBarrierFastPathNullYoungLarge avgt 12 3448.055 ± 0.665 ns/op
> WriteBarrier.WithoutUnrolling.testArrayWriteBarrierFastPathNullYoungSmall avgt 12 63.555 ± 0.116 ns/op
> WriteBarrier.Witho...
Eric Caspole has updated the pull request incrementally with two additional commits since the last revision:
- Update test/micro/org/openjdk/bench/vm/compiler/WriteBarrier.java
Co-authored-by: Thomas Schatzl <59967451+tschatzl at users.noreply.github.com>
- Update test/micro/org/openjdk/bench/vm/compiler/WriteBarrier.java
Co-authored-by: Thomas Schatzl <59967451+tschatzl at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24010/files
- new: https://git.openjdk.org/jdk/pull/24010/files/7075365a..46da7dbc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24010&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24010&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/24010.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24010/head:pull/24010
PR: https://git.openjdk.org/jdk/pull/24010
More information about the hotspot-gc-dev
mailing list