RFR: 8255973: Add more logging to debug JDK-8255917 [v3]
Yumin Qi
minqi at openjdk.java.net
Thu Nov 12 06:21:58 UTC 2020
On Thu, 12 Nov 2020 06:05:02 GMT, Thomas Stuefe <stuefe 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
>
> src/hotspot/share/runtime/os.cpp line 1676:
>
>> 1674: lt.print("Attempt to reserve memory at " INTPTR_FORMAT " for "
>> 1675: SIZE_FORMAT " bytes failed\n", p2i(addr), bytes);
>> 1676: }
>
> Can you please add GetLastError? (returns a 32bit unsigned, so use %u and maybe cast to unsigned explicitly: (.. failed (%u)", ..., (unsigned) ::GetLastError())
>
> Is there any reason not to just use log_info(os)("..") instead of LogTarget?
With using LogTarget, we can check if it is enabled, and skip the real printing work, but log_info etc also check that I think. I will add to get last error and change to use log_info(os)("....").
-------------
PR: https://git.openjdk.java.net/jdk/pull/1150
More information about the hotspot-runtime-dev
mailing list