-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8310264: In PhaseChaitin::Split defs and phis are leaked #14530
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
Conversation
|
👋 Welcome back jsjolen! A progress list of the required criteria for merging this PR into |
|
@jdksjolen The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
TobiHartmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
|
@jdksjolen 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: 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 186 new commits pushed to the
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. ➡️ To integrate this PR with the above commit message to the |
chhagedorn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'm wondering, why we don't stack allocate both Node_List instead of new Node_List(). But regardless of that, we should indeed add a ResourceMark.
|
Looking at f0d08c0 -- it would seem that |
|
Hi, In pursuit of answering your questions I saw some more opportunities for improvement. I did end up removing the First of all, the Second of all @shipilev asked a good question, and I think that we can move For what it's worth, the number of |
TobiHartmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Looks good to me otherwise.
src/hotspot/share/opto/reg_split.cpp
Outdated
| Node_List defs{split_arena, 8}; | ||
| Node_List phis{split_arena, 16}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use aggregate initialization instead of constructor invocation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will call the constructor, and has since C++11 I believe. However, I'm clearly being inconsistent here and with the VectorSet change above. There's no reason that I picked brace initializer other than it being the 'modern' way: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list
I'll revert this change and use regular parens to be more stylistically consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md "uniform initialization", it's OK to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the background, I wasn't aware of that. I don't have a strong opinion but consistency in the same area would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, change to normal (). Using '{}' is very confusing for not modern C++ experts and affects maintainability of this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input, reverted to ().
|
@chhagedorn , @TobiHartmann , would you mind re-approving this PR? Thank you. |
chhagedorn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update looks good!
TobiHartmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too.
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
|
Thank you. /integrate |
|
Going to push as commit 02b17d7.
Your commit was automatically rebased without conflicts. |
|
@jdksjolen Pushed as commit 02b17d7. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
defsandphisare leaked as they are resource allocated but not protected by aResourceMark. The intention might have been for these to also live in thesplit_arena.. This change is the most conservative one, however, and does fix the memory leak.Please consider, thanks.
Johan
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14530/head:pull/14530$ git checkout pull/14530Update a local copy of the PR:
$ git checkout pull/14530$ git pull https://git.openjdk.org/jdk.git pull/14530/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14530View PR using the GUI difftool:
$ git pr show -t 14530Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14530.diff
Webrev
Link to Webrev Comment