[16] RFR(T) 8248426: NMT: VirtualMemoryTracker::split_reserved_region() does not properly update summary counting

Thomas Stüfe thomas.stuefe at gmail.com
Mon Jun 29 05:42:23 UTC 2020


Hi Zhengyu,

thanks for finding this.

VirtualMemoryTracker::remove_released_region() makes me nervous though
because it does so much more than just removing the bookkeeping for the
region.
- removing committed regions - the space should be uncommitted
- all that special CDS handling. Basically means I will never be able to
split a reserved region tracked as mtClassShared.
- splitting the reserved region

Could we not simply add the call
to VirtualMemorySummary::record_released_memory(size,
reserved_rgn->flag()); to VirtualMemoryTracker::split_reserved_region()
instead?

Thanks, Thomas





On Fri, Jun 26, 2020 at 10:54 PM Zhengyu Gu <zgu at redhat.com> wrote:

> Hi,
>
> Please review this trivial patch that fixes summary counting in
> VirtualMemoryTracker::split_reserved_region().
>
> The method uses internal method to remove a reserved region, which does
> not update counting information. It should use high level tracking
> method VirtualMemoryTracker::remove_released_region() instead.
>
> Without patch, NMT summary reports uncategorized memory, e.g.
>
> -                   Unknown (reserved=1060416KB, committed=0KB)
>                              (mmap: reserved=1060416KB, committed=0KB)
>
>
>
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8248426
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8248426/webrev.00/
>
> Test:
>    hotspot_nmt
>    Submit test in progress
>
>
> Thanks,
>
> -Zhengyu
>
>


More information about the hotspot-runtime-dev mailing list