RFR: 8255973: Add more logging to debug JDK-8255917 [v3]

Thomas Stuefe stuefe at openjdk.java.net
Thu Nov 12 05:27:57 UTC 2020


On Thu, 12 Nov 2020 05:24:05 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make nmt log at debug level, and attempt_reserve_memory_at failed log to os+metaspace debug level
>
> Changes requested by dholmes (Reviewer).

Please don't use the metaspace tag for logging inside these generic functions, this makes no sense. Also, I kept the "metaspace" log clean and consistent with JEP387. This should log with only "os" and nothing else.

Contrary to David I think the original "info" level is fine. We have no guidelines for this unfortunately, but I usually do hard errors - which are too "soft" for warning level, which is printed always - at info. And this output will not be seen often.

About UL circularity, UL should get fixed - it should not allocate memory while logging.

> src/hotspot/share/runtime/os.cpp line 1672:
> 
>> 1670:     MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC);
>> 1671:   } else {
>> 1672:     LogTarget(Debug, os, metaspace) lt;
> 
> You only needed to change:
> `log_info(metaspace)("...");`
> to
> `log_debug(os, metaspace)("...")`

I'd opt for info. This is a hard bug, which - almost - is worth a log_warning. It should not get drowned in debug or trace.

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

PR: https://git.openjdk.java.net/jdk/pull/1150


More information about the hotspot-runtime-dev mailing list