On Mon, 25 Nov 2024 12:26:37 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> 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. Plus, this method can be expanded to a very large method (before constant folding) so we will need to be careful applying `@ForceInline` to it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22344#discussion_r1858727891