-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8257676: Simplify WeakProcessorPhase #1620
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 kbarrett! A progress list of the required criteria for merging this PR into |
|
/label hotspot-gc |
|
@kimbarrett 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. |
|
@kimbarrett |
|
/label remove hotspot |
|
@kimbarrett |
Webrevs
|
walulyai
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.
lgtm
| CountingClosure<IsAlive, KeepAlive> cl(is_alive, keep_alive); | ||
| WeakProcessorPhaseTimeTracker pt(_phase_times, phase, worker_id); | ||
| StorageState* cur_state = _storage_states.par_state(phase); | ||
| int state_index = checked_cast<int>(phase_range.index(phase)); |
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.
I feel EnumRange<WeakProcessorPhase>().index(phase) is better than phase_range.index(phase), since we want to know the "global" index for this phase, not the "local" index within this particular range instance. The two are identical currently. However, if the for-loop is iterating over a subset of all WeakProcessorPhase, the two cases will give different results, I believe.
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.
I agree that this isn't entirely ideal as-is. If someone were to change
phase_range to be a subset of the full range, then this line would need to
be examined and probably modified. However, that's not going to happen. This
PR is an intermediate step toward eliminating WeakProcessorPhase entirely,
which will address this issue (among others). I have that followup ready for
review once this one is integrated and I've rebased and retested.
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.
I see; thanks for the explanation.
|
@kimbarrett 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
|
Thanks @walulyai , @albertnetymk , @tschatzl for reviews. |
|
/integrate |
|
@kimbarrett Pushed as commit fa20186. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this reimplementation of WeakProcessorPhase. It is changed to
a scoped enum at namespace scope, and uses the recently added EnumIterator
facility to provide iteration, rather than a bespoke iterator class.
This is a step toward eliminating it entirely. I've split it out into a
separate PR to make the review of the follow-up work a bit easier.
As part of this the file weakProcessorPhases.hpp is renamed to
weakProcessorPhase.hpp, but git doesn't seem to be recognizing that as a
rename and (majorly) edit, instead treating it as a remove and add a new
file.
Testing: mach5 tier1
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1620/head:pull/1620$ git checkout pull/1620