RFR: 8365991: AArch64: Ignore BlockZeroingLowLimit when UseBlockZeroing is false [v10]

Patrick Zhang qpzhang at openjdk.org
Thu Jan 29 14:54:13 UTC 2026


On Tue, 13 Jan 2026 09:55:59 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Patrick Zhang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Renamed the vars to unroll_words
>>   
>>   Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 6264:
> 
>> 6262:   // There is no need to check UseBlockZeroing here because that is
>> 6263:   // delegated to the zero_blocks stub. The code here is inlined, so
>> 6264:   // it is important to keep it small.
> 
> Suggestion:
> 
>   // The code here is inlined, so it is important to keep it small.
> 
> I find this "There is no need..." comment more confusing than helpful.

It is to warn others from having similar confusion or misunderstanding about why `BlockZeroingLowLimit` is checked is this `if-condition` without checking `UseBlockZeroing`. I think the comment is a necessary alarm.

> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 6277:
> 
>> 6275: #endif
>> 6276:     // Use 16 words (128 bytes) as the block size to unroll.
>> 6277:     const int unroll_words = 2 * MacroAssembler::zero_words_block_size;
> 
> const int unroll_words = 2 * MacroAssembler::zero_words_block_size;
> 
> 
> I do not believe this makes the code easier to understand. It's explicitly two DC ZVA blocks. Maybe `two_blocks` or somesuch would be clearer to the reader.
> 
> The "replace literal constants with named constants" advice helps when the named constant is informative, which `unroll_words` is not.

Sure, I will change it accordingly.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26917#discussion_r2742006220
PR Review Comment: https://git.openjdk.org/jdk/pull/26917#discussion_r2742043269


More information about the hotspot-dev mailing list