[foreign-abi] RFR: 8251048: Add some upcall benchmarks

Jorn Vernee jvernee at openjdk.java.net
Tue Aug 4 14:23:18 UTC 2020


Hi,

This patch adds a few basic upcall benchmarks to measure the call overhead between JNI and panama, in order to track
future progress to optimize upcalls. (Currently panama is slower, because we basically do JNI + extras, but the code
needed to get there is significantly simpler for panama's API).

I've also added jvm args to `@Fork` annotations for all the benchmarks, so they don't have to be passed on the command
line (only --enable-preview has to be passed currently, which is a temporary workaround for another issue).

I've also removed the NO_SPEC variants from the CallOverhead benchmark, since the flag no longer exists. We also
weren't covering all the combinations of USE_SPEC and USE_INTRINSICS. Rather than adding benchmark methods for each
combination, the same results can be found by setting the relevant system properties on the command line, which keeps
the code simpler.

Thanks,
Jorn

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

Commit messages:
 - Add missing newline
 - Fix Utils references
 - Add upcall benchmarks and
 - update all benchmarks to pass VM flags using @Fork

Changes: https://git.openjdk.java.net/panama-foreign/pull/277/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/277/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8251048
  Stats: 297 lines in 17 files changed: 246 ins; 37 del; 14 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/277.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/277/head:pull/277

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


More information about the panama-dev mailing list