RFR: 8313302: Fix formatting errors on Windows [v3]
Thomas Stuefe
stuefe at openjdk.org
Fri Jul 28 10:40:54 UTC 2023
On Fri, 28 Jul 2023 10:08:56 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/hotspot/share/code/codeHeapState.cpp line 1334:
>>
>>> 1332: if (SizeDistributionArray != nullptr) {
>>> 1333: unsigned long total_count = 0;
>>> 1334: uint64_t total_size = 0;
>>
>> This is a functional change (actually the only one I could spot), and it increases the size of this type to 64-bit on Windows.
>>
>> It may also be incorrect, since on 32-bit platforms you probably don't want 64-bit here. The correct type to use would be size_t.
>>
>> Since this change is hidden in a deluge of unnecessary cosmetic changes, if we feel this is needed, this should be addressed in a separate RFE.
>>
>> But then again, probably not: code cache size is limited to 32-bit, and I bet we have a lot more places to change if we wanted to change that.
>>
>> Also way out of scope for the RFE description.
>
> For this one (and the one below) I couldn't figure out whether the intention was for a 32 or 64 bit number in this case. This would be 64 bit on every platform but on Windows, which is 32 bit, and the code directly below this also faces the same issue too, is this intentional?
long is 32-bit on Linux x86 and arm32 too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15063#discussion_r1277388936
More information about the graal-dev
mailing list