jdk17u-dev icon indicating copy to clipboard operation
jdk17u-dev copied to clipboard

8315559: Delay TempSymbol cleanup to avoid symbol table churn

Open olivergillespie opened this issue 1 year ago • 9 comments
trafficstars

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

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] 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 - Requested)

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

olivergillespie avatar Apr 22 '24 15:04 olivergillespie

:wave: 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.

bridgekeeper[bot] avatar Apr 22 '24 15:04 bridgekeeper[bot]

@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:

  • 1ce0c63577a9480f162e762fd8a1db344955d5a7: 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[bot] avatar Apr 22 '24 15:04 openjdk[bot]

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

openjdk[bot] avatar Apr 22 '24 15:04 openjdk[bot]

Webrevs

mlbridge[bot] avatar Apr 22 '24 15:04 mlbridge[bot]

⚠️ @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.

openjdk[bot] avatar Apr 22 '24 21:04 openjdk[bot]

/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.

olivergillespie avatar Apr 23 '24 08:04 olivergillespie

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

openjdk[bot] avatar Apr 23 '24 08:04 openjdk[bot]

I'll approve this for the October update.

GoeLin avatar Apr 25 '24 08:04 GoeLin

Cool, thanks!

olivergillespie avatar Apr 25 '24 09:04 olivergillespie

@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!

bridgekeeper[bot] avatar May 23 '24 14:05 bridgekeeper[bot]

(keepalive)

olivergillespie avatar May 23 '24 15:05 olivergillespie

/integrate

olivergillespie avatar Jun 03 '24 14:06 olivergillespie

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

openjdk[bot] avatar Jun 03 '24 14:06 openjdk[bot]

/sponsor

shipilev avatar Jun 03 '24 14:06 shipilev

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

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

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Jun 03 '24 14:06 openjdk[bot]

@shipilev @olivergillespie Pushed as commit 1b807f914a8ee5030d35ebc69edc5429cac0c44d.

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

openjdk[bot] avatar Jun 03 '24 14:06 openjdk[bot]