-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
MemorySegment::reintrepret is a caller sensitive method. The caller of the method is determined by using Reflection.getCallerClass(). This method is fast when MemorySegment::reinterpret is inlined, since the caller essentially becomes a constant, but when MemorySegment::reinterpret is not inlined, getCallerClass falls back to a very slow stack walk to get the caller.
Since MemorySegment::reinterpret can appear in performance critical sections of an application, we should mark these relatively small methods with @ForceInline, so that getCallerClass will always have a chance to be intrinsified, and we avoid the slower stack walk fallback.
Since MemorySegment::reinterpret can appear in performance critical sections of an application, we should mark these relatively small methods with @ForceInline, so that getCallerClass will always have a chance to be intrinsified, and we avoid the slower stack walk fallback.
- links to
-
Commit(master) openjdk/jdk/137ad5d0
-
Review(master) openjdk/jdk/23352