RFR: 8342540: InterfaceCalls micro-benchmark gives misleading results [v2]
Andrew Haley
aph at openjdk.org
Fri Oct 18 16:18:02 UTC 2024
> `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.
Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
Update test/micro/org/openjdk/bench/vm/compiler/InterfaceCalls.java
Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21581/files
- new: https://git.openjdk.org/jdk/pull/21581/files/c3fa63c5..52f80b28
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21581&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21581&range=00-01
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/21581.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21581/head:pull/21581
PR: https://git.openjdk.org/jdk/pull/21581
More information about the hotspot-compiler-dev
mailing list