RFR: JDK-8323497: On x64, use 32-bit immediate moves for narrow klass base if possible [v3]
Aleksey Shipilev
shade at openjdk.org
Wed Feb 21 10:49:56 UTC 2024
On Wed, 21 Feb 2024 07:35:23 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/cpu/x86/compressedKlass_x86.cpp line 44:
>>
>>> 42: result = reserve_address_space_for_zerobased_encoding(size, aslr);
>>> 43: }
>>> 44: } else {
>>
>> This should be:
>>
>> if (result == nullptr) {
>> // If we cannot use zero-based encoding (when CDS is enabled), optimizing for an
>> ...
>> }
>
> I don't think so. Why?
I think the point is to reflow this into the series of ifs:
char* result = nullptr;
if (optimize_for_zero_base) {
result = ...
}
if (result == nullptr) {
result = ...
}
Probably good for future maintenance if we want to add more cases in this block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17340#discussion_r1497302551
More information about the hotspot-dev
mailing list