crac
crac copied to clipboard
Simplify CPUFeatures code
There is no functionality change. I guess the new code should be more simple and shorter. It was originally suggested by @AntonKozlov to use more functions than macros.
1 file changed, 44 insertions(+), 82 deletions(-)
So I find it clearly an improvement.
The readable sub-commit is: https://github.com/openjdk/crac/pull/112/commits/6d9cb72b7a838dd4c9f107c5b71c4275005a0c23
Otherwise it gets messed up by the other commit just renaming things.
As an explanation: Original code had two lists of the same CPU features. An EXCESSIVE
list and an GLIBC_DISABLE
list. The had to be kept in sync (their sets being equal) which was sanity checked:
if (PASTE_TOKENS(disable_handled_, kind) != PASTE_TOKENS(excessive_handled_, kind)) \
So now there is the list just once (EXCESSIVE
, the GLIBC_DISABLE
one has been deleted). It looks stupid but when coding it I did not see it.
Coding both variants of #136 was needlessly more difficult without this pull request applied and now I have to rebase this pull request.
Progress
- [x] Change must not contain extraneous whitespace
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/crac.git pull/112/head:pull/112
$ git checkout pull/112
Update a local copy of the PR:
$ git checkout pull/112
$ git pull https://git.openjdk.org/crac.git pull/112/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 112
View PR using the GUI difftool:
$ git pr show -t 112
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/crac/pull/112.diff
Webrev
:wave: Welcome back jkratochvil! A progress list of the required criteria for merging this PR into crac
will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@jankratochvil 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:
Simplify CPUFeatures code
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 crac
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.
As you do not have Committer status in this project an existing Committer must agree to sponsor your change.
➡️ 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).
As much as I'd like to keep the PR queue short I am unfamiliar with this part of codebase, I'll leave the review up to @AntonKozlov since he did the review last time.
Please note the changes are split into two different commits to make the review easier.
@jankratochvil this pull request can not be integrated into crac
due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:
git checkout crac-cpufeaturessimplify
git fetch https://git.openjdk.org/crac.git crac
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge crac"
git push
Converted it to draft until #139 gets accepted.
@jankratochvil This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 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!
@jankratochvil This pull request has been inactive for more than 16 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open
pull request command.
/open
@jankratochvil This pull request is now open
@jankratochvil 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!
I have submitted it downstream, it can bubble up here upstream later.