On Mon, 25 Nov 2024 11:57:21 GMT, Maurizio Cimadamore <mcimadam...@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

Reply via email to