RFR: JDK-8304954: SegmentedCodeCache fails when using large pages [v4]
Thomas Stuefe
stuefe at openjdk.org
Tue Jul 25 07:57:42 UTC 2023
On Tue, 25 Jul 2023 07:39:02 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:
>> src/hotspot/share/code/codeCache.cpp line 322:
>>
>>> 320: byte_size_in_exact_unit(LargePageSizeInBytes), exact_unit_for_byte_size(LargePageSizeInBytes),
>>> 321: byte_size_in_exact_unit(ps), exact_unit_for_byte_size(ps));
>>> 322: log_warning(codecache)("%s", msg);
>>
>> Also, no need to print into a temp buffer. log_xxx() accepts var-args, so you can pass the format string + args directly.
>
> I've used the buffer since the message is used in 2 different places:
> https://github.com/openjdk/jdk/blob/e1b09a9fe267d6aa48f4656652411000a4f4d2ee/src/hotspot/share/code/codeCache.cpp#L317-L323
> (not 100% sure why, but I've noticed that it is how warnings are handled in other places in the code)
Ah. missed the second warning. You don't need both. log_warning should be enough and mirrors what we usually do in other places. I assume "warning" is a relict from a time before UL.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14903#discussion_r1273146300
More information about the hotspot-compiler-dev
mailing list