RFR: 8255973: Add more logging to debug JDK-8255917 [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Nov 11 10:19:59 UTC 2020
On Wed, 11 Nov 2020 02:28:09 GMT, Yumin Qi <minqi at openjdk.org> wrote:
>> Hi, Please review
>>
>> JDK-8255917 failed on not finding the committed region from the _reserved_regions list when try to add the region to the committed list. It looks like possible the region was released without logged.
>> Added a log tag for tracing Native Memory Tracking (NMT) add/remove recorded info. This could help us to identify the problem for NMT or the code behind NMT. Function pd_attempt_reserve_memory_at could fail, but no message logged, so added a logging for its failure.
>>
>> Tests: tier1-4, local jtreg.
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix the region extra type name
Hi, Yumin,
are you sure UL is safe to use from inside NMT? I see that UL seems to allocate memory, see e.g. LogTagSet::vwrite(). Mentally I had earmarked UL as "don't use in anything at or below os::malloc".
Other than that, only small nits.
Cheers, Thomas
src/hotspot/share/runtime/os.cpp line 1672:
> 1670: MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC);
> 1671: } else {
> 1672: log_info(metaspace)("Attempt to reserve memory at " INTPTR_FORMAT " for "
Why is this logged for "metaspace"? I would use "os"
src/hotspot/share/services/virtualMemoryTracker.cpp line 293:
> 291: void ReservedMemoryRegion::set_flag(MEMFLAGS f) {
> 292: assert((flag() == mtNone || flag() == f),
> 293: "Overwrite memory type for region [" INTPTR_FORMAT "-" INTPTR_FORMAT "), %u->%u.",
Why the explicit change to INTPTR_FORMAT? (real question, I actually do not know the difference to PTR_FORMAT, since their definition seems to be identical)
-------------
PR: https://git.openjdk.java.net/jdk/pull/1150
More information about the hotspot-runtime-dev
mailing list