RFR: 8261859: gc/g1/TestStringDeduplicationTableRehash.java failed with "RuntimeException: 'Rehash Count: 0' found in stdout" [v2]
Kim Barrett
kbarrett at openjdk.java.net
Mon Mar 1 17:18:57 UTC 2021
On Mon, 1 Mar 2021 13:46:26 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp line 424:
>>
>>> 422: assert(size <= _max_size, "invariant: %zu", size);
>>> 423: assert(size >= _min_size, "invariant: %zu", size);
>>> 424: assert(is_power_of_2(size), "invariant: %zu", size);
>>
>> Please also use `SIZE_FORMAT` instead of `%zu` like in the overwhelming majority for formatting `size_t`.
>
> I actually prefer `%zu`. I can't seem to find whether it's permitted or not in HotSpot Coding Style though.
This was discussed some time ago (maybe only Oracle internal?). So far as I can recall, everyone preferred using the 'z' qualifier and nobody liked the macro. The only concern was backports, but that didn't seem to be a problem. The consensus was to use it in new code and file an RFE for updating existing uses:
https://bugs.openjdk.java.net/browse/JDK-8256379
-------------
PR: https://git.openjdk.java.net/jdk/pull/2769
More information about the hotspot-gc-dev
mailing list