[foreign-memaccess+abi] Integrated: 8274592: Performance regression in upcalls

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Sep 30 14:40:17 UTC 2021


On Thu, 30 Sep 2021 13:49:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Following the recent API refresh, I noticed that the QSort benchmark was broken (as it passed `MemoryAddress` where `Addressable` was expected). Upon fixing the benchmark, I realized that performance of upcalls dropped significantly (~3x).
> 
> After some investigation, I realized that we were using the default scope factory (which uses a cleaner!) inside some classes in the linker implementation.
> 
> The solution is to use the explicit factory which disables the cleaner, so as to avoid overhead.
> 
> There were similar issues in microbenchmarks; while using the default factory is fine for e.g. fields, using it for benchmark code is not great, as that skews the benchmark (because of the cleaner). So I replaced all usages of the default factories in the benchmark methods, except in places where we explicitly wanted to use them.

This pull request has now been integrated.

Changeset: 9cd966f1
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/9cd966f1944a6109d1cc537510c3beae50348439
Stats:     30 lines in 10 files changed: 13 ins; 0 del; 17 mod

8274592: Performance regression in upcalls

Reviewed-by: jvernee

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

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


More information about the panama-dev mailing list