RFR: 8356233: NMT: tty->print_cr should not be used in VirtualMemoryTracker::add_reserved_region() [v2]
Gerard Ziemski
gziemski at openjdk.org
Tue May 20 16:05:38 UTC 2025
On Tue, 20 May 2025 06:56:45 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Johan's feedback
>
> src/hotspot/share/nmt/virtualMemoryTracker.cpp line 419:
>
>> 417: }
>> 418: const char* msg = ss.as_string(true /* on C-heap */);
>> 419: log_debug(nmt)("%s", msg);
>
> You can just do `log_debug(nmt)("%s", ss.freeze());` and skip the `as_string()`.
Sure, there are other cases of such usage, so I will file an issue in case we want to fix the other usage.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25308#discussion_r2098337807
More information about the hotspot-runtime-dev
mailing list