RFR: 8352075: Perf regression accessing fields [v27]
Kim Barrett
kbarrett at openjdk.org
Mon Jun 9 16:20:09 UTC 2025
On Mon, 9 Jun 2025 14:45:53 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/utilities/packedTable.cpp line 64:
>>
>>> 62: assert((value & ~_value_mask) == 0, "value out of bounds: %x vs. %x (%x)", value, _value_mask, ~_value_mask);
>>> 63: uint64_t element = static_cast<uint64_t>(key) | (static_cast<uint64_t>(value) << _value_shift);
>>> 64: __builtin_memcpy(table + offset, &element, _element_bytes);
>>
>> Looking at this is context makes more sense. We don't have __builtin_memcpy in the sources, just memcpy. Assuming the platform will do the right thing.
>
> The memcpy is better than what was there before.
I wouldn't expect using __builtin_memcpy to even compile in Windows. Use memcpy.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24847#discussion_r2135997724
More information about the hotspot-dev
mailing list