RFR: 8255973: Add more logging to debug JDK-8255917
Calvin Cheung
ccheung at openjdk.java.net
Wed Nov 11 00:48:04 UTC 2020
On Tue, 10 Nov 2020 23:23:29 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.
Looks good. Some nits below.
src/hotspot/share/services/virtualMemoryTracker.cpp line 387:
> 385: if (reserved_rgn->flag() == mtClassShared) {
> 386: log_info(nmt)("CDS reserved region \'%s\' as a whole type class (" INTPTR_FORMAT ", " SIZE_FORMAT ")",
> 387: reserved_rgn->flag_name(), p2i(reserved_rgn->base()), reserved_rgn->size());
Since you're logging the region name, I don't think you need to say `type class`.
src/hotspot/share/services/virtualMemoryTracker.cpp line 396:
> 394: if (reserved_rgn->flag() == mtJavaHeap) {
> 395: log_info(nmt)("CDS reserved region \'%s\' as a whole type heap " INTPTR_FORMAT ": " SIZE_FORMAT,
> 396: reserved_rgn->flag_name(), p2i(reserved_rgn->base()), reserved_rgn->size());
Since you're logging the region name, I don't think you need to say `type heap`.
src/hotspot/share/services/virtualMemoryTracker.hpp line 309:
> 307: void set_flag(MEMFLAGS flag);
> 308: inline MEMFLAGS flag() const { return _flag; }
> 309: // uncommitted thread stack bottom, above guard pages if there is any.
Line deleted by accident?
-------------
Marked as reviewed by ccheung (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1150
More information about the hotspot-runtime-dev
mailing list