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

8315559: Delay TempSymbol cleanup to avoid symbol table churn #2424

Conversation

olivergillespie
Copy link
Contributor

@olivergillespie olivergillespie commented Apr 22, 2024

Hi all,

This pull request contains a backport of commit d23f4f12 from the openjdk/jdk repository.

The commit being backported was authored by Oli Gillespie on 4 Dec 2023 and was reviewed by Coleen Phillimore, Kim Barrett and Aleksey Shipilev.

Thanks!

The backport is not clean. symbolHandle does not exist in 17, so I put the same functionality in symbolTable where TempNewSymbol resides for 17. The functionality itself is essentially identical, with the other change being that maybe_decrement_refcount helper also does not exist, so I just added a null check.
test/hotspot/gtest/classfile/test_placeholders.cpp does not exist, so it didn't need to be fixed. test_symbolTable.cpp failed as expected before fixing, and applied cleanly.

Testing on the original benchmark confirms this fixes the performance regression:

java -Xmx1G -Xms1G -XX:+AlwaysPreTouch -jar dacapo-9.120-MR1.jar --size large --iterations 30 pmd

Before:
...
===== DaCapo 9.12-MR1 pmd PASSED in 1072 msec =====

After:
...
===== DaCapo 9.12-MR1 pmd PASSED in 1013 msec =====

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8315559 needs maintainer approval

Issue

  • JDK-8315559: Delay TempSymbol cleanup to avoid symbol table churn (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2424/head:pull/2424
$ git checkout pull/2424

Update a local copy of the PR:
$ git checkout pull/2424
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2424/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2424

View PR using the GUI difftool:
$ git pr show -t 2424

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2424.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 22, 2024

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

@openjdk
Copy link

openjdk bot commented Apr 22, 2024

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

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

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

8315559: Delay TempSymbol cleanup to avoid symbol table churn

Reviewed-by: phh, shade

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 1 new commit pushed to the master branch:

  • 1ce0c63: 8324646: Avoid Class.forName in SecureRandom constructor

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee, @shipilev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport d23f4f12adf1ea26b8c340efe2c3854e50b68301 8315559: Delay TempSymbol cleanup to avoid symbol table churn Apr 22, 2024
@openjdk
Copy link

openjdk bot commented Apr 22, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Apr 22, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 22, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Apr 22, 2024

⚠️ @olivergillespie This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@olivergillespie
Copy link
Contributor Author

/approval request Fixes non-trivial performance regression in class-loading (dacapo pmd). Not clean due to file movement but simple to merge. Confirmed that the performance regression is present before the change and fixed after, using the original benchmark. Medium risk as it affects Symbol creation, but has been working in tip and 21 for a few months with no associated issues.

@openjdk
Copy link

openjdk bot commented Apr 23, 2024

@olivergillespie
8315559: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Apr 23, 2024
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@GoeLin
Copy link
Member

GoeLin commented Apr 25, 2024

I'll approve this for the October update.

@olivergillespie
Copy link
Contributor Author

Cool, thanks!

@bridgekeeper
Copy link

bridgekeeper bot commented May 23, 2024

@olivergillespie This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@olivergillespie
Copy link
Contributor Author

(keepalive)

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels May 29, 2024
@olivergillespie
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 3, 2024
@openjdk
Copy link

openjdk bot commented Jun 3, 2024

@olivergillespie
Your change (at version 8a76668) is now ready to be sponsored by a Committer.

@shipilev
Copy link
Member

shipilev commented Jun 3, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 3, 2024

Going to push as commit 1b807f9.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 1ce0c63: 8324646: Avoid Class.forName in SecureRandom constructor

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 3, 2024
@openjdk openjdk bot closed this Jun 3, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 3, 2024
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Jun 3, 2024
@openjdk
Copy link

openjdk bot commented Jun 3, 2024

@shipilev @olivergillespie Pushed as commit 1b807f9.

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

@olivergillespie olivergillespie deleted the backport-olivergillespie-d23f4f12 branch June 3, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
4 participants