RFR: 8331126: [s390x] secondary_super_cache does not scale well [v6]

Martin Doerr mdoerr at openjdk.org
Thu Jun 27 16:05:13 UTC 2024


On Thu, 27 Jun 2024 15:45:28 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3414:
>> 
>>> 3412: #ifdef ASSERT
>>> 3413:   {
>>> 3414:     // r_result should have either 0 or 1 value
>> 
>> Could be done with one check (clear bit 0).
>
> I guess this check requires the r_result to be in range `[0,1]`. So it checks (without modifying) whether the value is greater than or equal to 0 & less than equal to 1. 
> 
> By "clear bit 0" did you mean to `and` it with `1` and then do the check ? I'm really not sure what were your  thoughts. Could you please elaborate ?

There are several ways to clear the least significant bit. E.g. `and` it with ~1 and compare the result with 0. Or shift right by 1 and compare the result with 0.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19544#discussion_r1657403684


More information about the hotspot-dev mailing list