[foreign-abi] RFR: Turn on downcall intrinsics by default

Jorn Vernee jvernee at openjdk.java.net
Tue Sep 22 14:06:32 UTC 2020


Hi,

This PR turns on down call intrinsics by default.

Since the time they were turned off some fixes have been done in the area of GC handling of optimized native calls, and
no further problems in that area have been found. What currently works is:

1. All TestDowncall and TestUpcall tests, where each function is invoked in a 20_000 iteration loop with -Xbatch,
making sure these calls are intrinsified. 2. TestIntrinsics tests which intrinsifies calls the same way.
3. All jextract samples with intrinsics turned on, which from the logs also leads to calls being intrinsified,
especially on large extraction runs like Windows.h.

There is one more case that is known to be problematic: TestUpcallHighArity crashes/fails when the call is intrinsified
(using same method as 1 and 2). This seems to be caused by a known problem with the handling on stack arguments for
intrinsified calls. So, for now, intrinsification of calls that pass arguments on the stack will be turned off.

If there are other cases you would like to make sure work, please take the test for a spin.

Thanks,
Jorn

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

Commit messages:
 - Enable intrinsics by default
 - Dissable intrinsics for stack arguments

Changes: https://git.openjdk.java.net/panama-foreign/pull/354/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=354&range=00
  Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/354.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/354/head:pull/354

PR: https://git.openjdk.java.net/panama-foreign/pull/354


More information about the panama-dev mailing list