[crac] RFR: Simplify CPUFeatures code [v3]

Jan Kratochvil jkratochvil at openjdk.org
Sun May 26 12:43:24 UTC 2024


On Thu, 18 Apr 2024 13:59:29 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

>> 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 incrementally with one additional commit since the last revision:
> 
>   Remove iomanip fix

I have submitted it downstream, it can bubble up here upstream later.

-------------

PR Comment: https://git.openjdk.org/crac/pull/112#issuecomment-2132206828


More information about the crac-dev mailing list