Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274592: Performance regression in upcalls #588


Copy link

@mcimadamore mcimadamore commented Sep 30, 2021

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.


  • Change must not contain extraneous whitespace
  • Change must be properly reviewed




Using git

Checkout this PR locally:
$ git fetch pull/588/head:pull/588
$ git checkout pull/588

Update a local copy of the PR:
$ git checkout pull/588
$ git pull 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:

* fix performance regression
* fix QSort compilation issue
* fix benchmarks
Copy link

bridgekeeper bot commented Sep 30, 2021

👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into foreign-memaccess+abi will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Ready for review label Sep 30, 2021
Copy link

mlbridge bot commented Sep 30, 2021


Copy link

openjdk bot commented Sep 30, 2021

@mcimadamore This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8274592: Performance regression in upcalls

Reviewed-by: jvernee

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the foreign-memaccess+abi branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the foreign-memaccess+abi branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label Sep 30, 2021
Copy link
Collaborator Author


Copy link

openjdk bot commented Sep 30, 2021

Going to push as commit 9cd966f.

@openjdk openjdk bot closed this Sep 30, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated rfr Ready for review labels Sep 30, 2021
Copy link

openjdk bot commented Sep 30, 2021

@mcimadamore Pushed as commit 9cd966f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
integrated Pull request has been integrated
2 participants