RFR: 8344912: Sharpen the return type of various internal methods in jdk.internal.foreign [v3]
Jorn Vernee
jvernee at openjdk.org
Mon Nov 25 12:29:14 UTC 2024
On Mon, 25 Nov 2024 11:57:21 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix failing tests
>
> src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 144:
>
>> 142: }
>> 143:
>> 144: private NativeMemorySegmentImpl reinterpretInternal(Class<?> callerClass, long newSize, MemorySessionImpl scope, Consumer<MemorySegment> cleanup) {
>
> This method is also probably missing a `ForceInline`
I think it's the other `reinterpret` methods that use `Reflection.getCallerClass` which are alsocritical to force-inline. Since the non-inlined/non-intrinsic version does a very slow stack walk to get the caller.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22344#discussion_r1856531005
More information about the core-libs-dev
mailing list