RFR: 8342540: InterfaceCalls micro-benchmark gives misleading results [v2]
Vladimir Kozlov
kvn at openjdk.org
Tue Oct 29 16:15:11 UTC 2024
On Fri, 18 Oct 2024 16:18:02 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.
>
> 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>
Good.
-------------
Marked as reviewed by kvn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21581#pullrequestreview-2402447482
More information about the hotspot-compiler-dev
mailing list