RFR: 8313302: Fix formatting errors on Windows [v3]
Kim Barrett
kbarrett at openjdk.org
Mon Aug 7 09:15:36 UTC 2023
On Fri, 28 Jul 2023 09:33:45 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>>
>> zPhysicalMemoryBacking_windows.cpp
>
> src/hotspot/share/code/codeHeapState.cpp line 1387:
>
>> 1385: " occupied space) is used by the blocks in the given size range.\n"
>> 1386: " %ld characters are printed per percentage point.\n", pctFactor/100);
>> 1387: ast->print_cr("total size of all blocks: " INT64_FORMAT_W(7) "M", (total_size<<log2_seg_size)/M);
>
> Wrong for 32-bit platforms.
We shouldn't defer the issue of what type `total_size` should be. That's the underlying source of the problem. Don't use `long` types in shared code! I agree with @tstuefe - these should be `size_t`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15063#discussion_r1285597007
More information about the graal-dev
mailing list