RFR: 8361085: MemoryReserver log_on_large_pages_failure has incorrect format usage

Kim Barrett kbarrett at openjdk.org
Mon Jun 30 16:25:54 UTC 2025


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

-------------

Commit messages:
 - cleanup memoryServer large pages failure warning

Changes: https://git.openjdk.org/jdk/pull/26050/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26050&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8361085
  Stats: 6 lines in 1 file changed: 0 ins; 3 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/26050.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26050/head:pull/26050

PR: https://git.openjdk.org/jdk/pull/26050


More information about the hotspot-runtime-dev mailing list