8274592: Performance regression in upcalls #588
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Following the recent API refresh, I noticed that the QSort benchmark was broken (as it passed
MemoryAddress
whereAddressable
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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/panama-foreign pull/588/head:pull/588
$ git checkout pull/588
Update a local copy of the PR:
$ git checkout pull/588
$ git pull https://git.openjdk.java.net/panama-foreign pull/588/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 588
View PR using the GUI difftool:
$ git pr show -t 588
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/panama-foreign/pull/588.diff