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

Andrew Haley aph at openjdk.org
Mon Jul 1 08:49:25 UTC 2024


On Sun, 30 Jun 2024 15:34:02 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3243:
>> 
>>> 3241:   // Get the first array index that can contain super_klass.
>>> 3242:   if (bit != 0) {
>>> 3243:     pop_count_long(r_array_index, r_array_index, Z_R1_scratch); // all the registers are hardcoded so should be fine
>> 
>> This comment is also rather baffling. You seem to be concerned about something, but what? `pop_count_long` doesn't cause any particular risk, does it?
>
> For machines older than `Z15`, `pop_count_long` clobbers `Z_R1_scratch` register.  That's why I added it there.

Better then just to say what matters: "NB: May clobber Z_R1_scratch" or "Clobbers Z_R1_scratch on older machines."
"Should be fine" is just confusing because "should" is tentative, where you need to be certain in comments.

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

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


More information about the hotspot-dev mailing list