[foreign-memaccess+abi] RFR: 8299730: Add trivial call linker option

Jorn Vernee jvernee at openjdk.org
Tue Jan 24 15:46:24 UTC 2023


Add a trivial call linker option. This option acts as a hint to the runtime which indicates that a downcall is extremely short live (comparable to calling an empty function), and does not call back into Java.

Some implementations (like ours) might use this information to apply additional optimizations that are only applicable to trivial functions (dropping thread state transitions).

Note that the VM code diff looks kind of messy, but I essentially just put 3 `if` statements around the code that deals with the thread state transitions before and after the call. This also required moving the declarations of the `Label`s around though (so they are accessible from both ifs on the return path), which is probably messing up the diff view.

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

Commit messages:
 - doc touchup
 - weaken language
 - fix stubs
 - add trivial option

Changes: https://git.openjdk.org/panama-foreign/pull/771/files
 Webrev: https://webrevs.openjdk.org/?repo=panama-foreign&pr=771&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299730
  Stats: 420 lines in 17 files changed: 260 ins; 44 del; 116 mod
  Patch: https://git.openjdk.org/panama-foreign/pull/771.diff
  Fetch: git fetch https://git.openjdk.org/panama-foreign pull/771/head:pull/771

PR: https://git.openjdk.org/panama-foreign/pull/771


More information about the panama-dev mailing list