RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v13]

Aleksey Shipilev shade at openjdk.org
Wed Dec 3 18:53:13 UTC 2025


On Wed, 3 Dec 2025 18:45:25 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> test/micro/org/openjdk/bench/vm/gc/GCPatchingNmethodCost.java line 184:
>> 
>>> 182:     @Benchmark
>>> 183:     @Warmup(iterations = 0)
>>> 184:     @Measurement(iterations = 1)
>> 
>> Not sure what is the intent here. Maybe you wanted `@BenchmarkMode(OneShot)` instead?
>
> The current algorithm:
> - Create an object used in Java methods.
> - Run the methods in the interpreter.
> - Compile the methods.
> - Make the object garbage collectable.
> - Run GC (we measure this).
> 
> There are not many things to warm-up. And setting up everything for multiple iterations of GC runs might be expensive. Instead we use forks.
> 
> IMO, Yes it is `@BenchmarkMode(OneShot)`.

Yeah, but first GC would likely be slower, because it would have more real work to do. So you probably want OneShot with the default number of iterations. It will warmup by doing a few GCs, and then do a few other GCs for measurement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28328#discussion_r2586250541


More information about the shenandoah-dev mailing list