RFR: 8368781: PerfMemory - make issues more transparent [v7]
Goetz Lindenmaier
goetz at openjdk.org
Wed Oct 22 07:52:45 UTC 2025
On Tue, 21 Oct 2025 14:35:28 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 two additional commits since the last revision:
>
> - Reformatting suggested by David
> - unneeded \ removed
A general remark:
A few messages start with a capital letter. Personally, I prefer proper sentences or text close to that, but I think it is more common in the code base to not capitalize single phrases. Maybe we can harmonize this here, as we touch the messages anyways.
Also, I think the JBS issue should be Enhancement, and I would appreciate a sentence in the description of how to retrieve the messages after the change.
src/hotspot/os/posix/perfMemory_posix.cpp line 1042:
> 1040:
> 1041: if (mapAddress == MAP_FAILED) {
> 1042: log_debug(perf)("mmap failed - %s", os::strerror(errno));
You might fix the double whitespace here ... or is this intended?
src/hotspot/os/windows/perfMemory_windows.cpp line 99:
> 97: if (fd == OS_ERR) {
> 98: log_debug(perf)("Could not create Perfdata save file: %s: %s",
> 99: destfile, os::strerror(errno));
Should we spell Perfdata camel-case as above?
src/hotspot/os/windows/perfMemory_windows.cpp line 105:
> 103: int nbytes = ::_write(fd, addr, (unsigned int)remaining);
> 104: if (nbytes == OS_ERR) {
> 105: log_debug(perf)("Could not write Perfdata save file: %s: %s",
Camel-case?
src/hotspot/os/windows/perfMemory_windows.cpp line 246:
> 244: //
> 245: log_debug(perf)("%s is not a directory, file attributes = "
> 246: INTPTR_FORMAT, path, fa);
Maybe use : instead of = for consistency
src/hotspot/os/windows/perfMemory_windows.cpp line 1176:
> 1174: if (!SetFileSecurity(dirname, secInfo, pDirSA->lpSecurityDescriptor)) {
> 1175: lasterror = GetLastError();
> 1176: log_debug(perf)("SetFileSecurity failed for %s directory. lasterror %d", dirname, lasterror);
Maybe add = after lasterror.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27602#pullrequestreview-3364026379
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2450685542
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2450724408
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2450724966
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2450730281
PR Review Comment: https://git.openjdk.org/jdk/pull/27602#discussion_r2450736621
More information about the hotspot-runtime-dev
mailing list