NMT and adjacent reserved regions

Zhengyu Gu zgu at redhat.com
Thu May 14 12:50:56 UTC 2020


Hi Thomas,

IIRC, we do intend to collapse neighboring reserved regions, iff

1) same memory type
2) same allocation site

Thanks,

-Zhengyu

On 5/14/20 7:30 AM, Thomas Stüfe wrote:
> Hi,
> 
> I am currently working at a fix for JDK-8243535
> <https://bugs.openjdk.java.net/browse/JDK-8243535> (NMT does not handle
> os::split_reserved_space()).
> 
> I was looking at how NMT treats adjacent reserved regions. Do we collapse
> them in NMT? The code here
> 
> http://hg.openjdk.java.net/jdk/jdk/file/a44396903fd8/src/hotspot/share/services/virtualMemoryTracker.cpp#l351
> 
> seems to suggest we do.
> 
> However I believe we never enter this case since the region was obtained
> using _reserved_regions->find(rgn); which only returns overlapping regions,
> excluding neighbors.
> 
> So IIUC currently we do not collapse adjacent regions. I think this is also
> the correct behavior. Is above posted code snippet an overlook then?
> 
> Or do we want to collapse regions? I think this makes not much sense
> though, since neighboring reservations may and do come from different
> callers with different memory flags.
> 
> Thanks for clarifying,
> 
> Thomas
> 



More information about the hotspot-runtime-dev mailing list