[crac] RFR: Simplify CPUFeatures code [v2]
Jan Kratochvil
jkratochvil at openjdk.org
Tue Apr 9 12:14:32 UTC 2024
> 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.
Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
- Fix disabling glibc features
- Merge branch 'crac' into crac-cpufeaturessimplify-merge
- Rename excessive/i to shouldnotuse/i
- Simplify CPUFeatures code
-------------
Changes: https://git.openjdk.org/crac/pull/112/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=112&range=01
Stats: 118 lines in 2 files changed: 24 ins; 63 del; 31 mod
Patch: https://git.openjdk.org/crac/pull/112.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/112/head:pull/112
PR: https://git.openjdk.org/crac/pull/112
More information about the crac-dev
mailing list