Integrated: 8348976: MemorySegment::reinretpret should be force inlined

Jorn Vernee jvernee at openjdk.org
Fri Jan 31 16:51:49 UTC 2025


On Wed, 29 Jan 2025 16:15:51 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> See the JBS issue.
> 
> Mark the implementation of `MemorySegment::reinterpret` with `@ForceInline` so that we prevent `Reflection.getCallerClass` from falling back to a slow stack walk.
> 
> This is a leftover from an earlier performance investigation, in which we observed `reinterpret` not being inlined, causing significant slowdowns.

This pull request has now been integrated.

Changeset: 137ad5d0
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/137ad5d03c598d5e2888d08e6fbc638936650f30
Stats:     3 lines in 1 file changed: 3 ins; 0 del; 0 mod

8348976: MemorySegment::reinretpret should be force inlined

Reviewed-by: liach

-------------

PR: https://git.openjdk.org/jdk/pull/23352


More information about the core-libs-dev mailing list