Integrated: 8342540: InterfaceCalls micro-benchmark gives misleading results

Andrew Haley aph at openjdk.org
Wed Nov 6 17:55:35 UTC 2024


On Fri, 18 Oct 2024 11:53:06 GMT, Andrew Haley <aph at openjdk.org> wrote:

> `InterfaceCalls.java` makes highly predictable memory accesses, which leads to a gross time underestimate of the case where a megamorphic access is unpredictable.
> 
> Here's one example, with and without randomization. The unpredictable megamorphic call takes more than 4* as long as the benchmark.
> 
> 
> Benchmark                            (randomized)  Mode  Cnt   Score   Error  Units
> InterfaceCalls.test2ndInt3Types             false  avgt    4   5.013 ± 0.081  ns/op
> InterfaceCalls.test2ndInt3Types              true  avgt    4  23.421 ± 0.102  ns/op
> ``` 
> 
> This patch adds the "randomized" parameter, which allows the measurement of predictable and unpredictable megamorphic calls.

This pull request has now been integrated.

Changeset: 78b378ad
Author:    Andrew Haley <aph at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/78b378ad03d0f6c85468ac208e84fabea79fc7de
Stats:     34 lines in 1 file changed: 22 ins; 6 del; 6 mod

8342540: InterfaceCalls micro-benchmark gives misleading results

Reviewed-by: shade, kvn

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

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


More information about the hotspot-compiler-dev mailing list