RFR: 8368781: PerfMemory - make issues more transparent [v3]

David Holmes dholmes at openjdk.org
Fri Oct 17 02:20:06 UTC 2025


On Thu, 16 Oct 2025 14:56:04 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Currently issues with perfMemory like problems with the secure tmp subdirectory creation are not very transparent in release JVMs.
>> 
>> There exists some warnings traces but they are behind develop flags like Verbose so only available in debug JVMs.
>> We could (in case of issues) store some information and write it later into hsinfo/hserr files ; or make the existing warnings available too in release JVMs.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adjust perf logging, remove EnhanceErrorWarningLogging

You need to include:

#include "logging/logStream.hpp"

to get `LogStream`. But note that simple cases don't need to use `LogStream`. I gave that example for the more complex cases.

Thanks

src/hotspot/os/posix/perfMemory_posix.cpp line 76:

> 74:     if (log_is_enabled(Debug, perf)) {
> 75:       LogStreamHandle(Debug, perf) log;
> 76:       log.print_cr("Could not commit PerfData memory\n");

For simple usages like this you can simplify.
Suggestion:

      log_debug(perf)("Could not commit PerfData memory");

also note to get rid of the explicit `\n` in the strings.

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

Changes requested by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27602#pullrequestreview-3347717174
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2438031597


More information about the hotspot-runtime-dev mailing list