RFR: 8344951: Stabilize write barrier micro-benchmarks

Vladimir Kozlov kvn at openjdk.org
Mon Dec 16 18:58:43 UTC 2024


On Mon, 16 Dec 2024 12:35:33 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset makes the `testArrayWriteBarrierFastPath*` micro-benchmarks in `WriteBarrier.java` more robust w.r.t. a few external factors, so that different GC barrier models can be compared more reliably. More specifically, it ensures that:
> 
>   - the main loop is never unrolled regardless of the selected GC algorithm,
>   - no spilling occurs within the main loop for the final C2 compilation, and
>   - the majority of the execution time is spent in the write operation and its associated barrier.
> 
> The changes preserve the original G1 barrier test profile, i.e. practically no write crosses heap regions under the default G1 configuration. More sophisticated benchmarks may be added in the future that exercise different G1 barrier levels.
> 
> Thanks to Thomas Schatzl for reporting and discussing issues in the micro-benchmarks.
> 
> **Testing:** build and run the micro-benchmarks (linux-x64, linux-aarch64, windows-x64, macosx-x64, macosx-aarch64).

Is it possible to have 2 runs: one with default `LoopUnrollLimit` and an other as you set.

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

PR Review: https://git.openjdk.org/jdk/pull/22763#pullrequestreview-2507019577


More information about the hotspot-compiler-dev mailing list