RFR: 8313306: More sensible reservation logging [v2]

David Holmes dholmes at openjdk.org
Mon Jan 29 02:18:30 UTC 2024


On Mon, 29 Jan 2024 02:01:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Sonia Zaldana Calles has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Implementation of high level debug logging and low level trace logging
>>  - Implementation of high level debug logging
>>  - Feedback - deleting oracle copyright and fixing INTPTR formatting
>
> src/hotspot/os/aix/os_aix.cpp line 300:
> 
>> 298:     if (::disclaim(p, maxDisclaimSize, DISCLAIM_ZEROMEM) != 0) {
>> 299:       ErrnoPreserver ep;
>> 300:       log_trace(os,map)("Cannot disclaim %p - %p (errno %d)\n", p, p + maxDisclaimSize, errno);
> 
> Using `os::strerror` or `os::errno_name` would be more user friendly than printing the numeric value. Don't simply replicate the crude approach of `trcVerbose`. This applies everywhere `errno` is being printed.

Also isn't the whole point of using the preserver to allow you capture errno and read it back from the preserver without caring if something in the logging code changed it in the meantime?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17356#discussion_r1469006303


More information about the hotspot-runtime-dev mailing list