RFR: 8361085: MemoryReserver log_on_large_pages_failure has incorrect format usage
Kim Barrett
kbarrett at openjdk.org
Wed Jul 2 00:28:44 UTC 2025
On Mon, 30 Jun 2025 16:46:28 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Please review this fix of an incorrect format usage.
>>
>> The function calls `jio_snprintf` to format a message into a buffer. That
>> message includes printing a pointer using `PTR_FORMAT`, but isn't using the
>> `p2i` helper function. Fixing that is just a matter of using that helper.
>>
>> However, there's no need to use `jio_snprintf` here, as the resulting message
>> is then just passed to `warning`, which can handle output formatting directly.
>> So we also move the formatting to the `warning` call, and remove the use of
>> `jio_snprintf`. Note that calling `warning` without the `p2i` would have
>> produced a compiler warning about the incorrect format usage.
>>
>> Testing: mach5 tier1
>
> Marked as reviewed by stefank (Reviewer).
Thanks for reviews @stefank and @dholmes-ora
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26050#issuecomment-3025910371
More information about the hotspot-runtime-dev
mailing list