RFR: 8341127: Extra call to MethodHandle::asType from memory segment var handles fails to inline [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Oct 1 16:11:38 UTC 2024
On Tue, 1 Oct 2024 15:49:22 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/java/lang/foreign/LoopOverNonConstantAsType.java line 103:
>>
>>> 101: }
>>> 102:
>>> 103: @CompilerControl(CompilerControl.Mode.DONT_INLINE)
>>
>> I think the intent was to block inlining of `asType`, so it gets compiled in isolation? That should be done with a `CompileCommand` though. This annotation just blocks inlining of `compileAsType` AFAIK.
>
> I see what you mean... I'll do some experiments and see how the current annotation affects the benchmark - if at all.
The issue with using a compile command is that it will then work globally. So the benchmark would not really test much - besides checking that var handle access is slow when `asType` cannot inline. What I was trying to do here was to avoid `asType` being inlined into that `compileAsType` method - but I agree that the annotation I added isn't it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21283#discussion_r1783141389
More information about the core-libs-dev
mailing list