remove INCLUDE_NMT?
David Holmes
david.holmes at oracle.com
Thu Jan 20 12:48:15 UTC 2022
On 20/01/2022 6:13 pm, Thomas Stüfe wrote:
> Hi David,
>
> On Thu, Jan 20, 2022 at 8:22 AM David Holmes <david.holmes at oracle.com
> <mailto:david.holmes at oracle.com>> wrote:
>
> Hi Thomas,
>
> On 20/01/2022 4:58 pm, Thomas Stüfe wrote:
> > Hi,
> >
> > we have NMT, and NMT can be disabled at build time. It can also
> be disabled
> > at runtime. NMT disabling at build time causes INCLUDE_NMT to be
> false.
> >
> > So we have four scenarios:
> >
> > 1 nmt disabled at build (minimal VM)
> > 2 nmt enabled, off
> > 3 nmt enabled, summary mode
> > 4 nmt enabled, detail mode
> >
> > Removing (1) would simplify code and be one less configuration to
> test. Do
> > we really need the ability to exclude NMT from build? We have other
> > facilities which are not strictly necessary either but which we
> cannot
> > disable, e.g. UL. So it feels a bit arbitrary to take that much
> care for
> > NMT. Was there a reason for that?
>
> It comes from the Compact Profiles work in JDK 8 and the MinimalVM. I
> would not put UL in the same category as NMT as UL is far more
> generally
> useful even in a MinimalVM (though UL did not exist in 8).
>
>
> Okay, fair point. I did not know about Compact Profiles.
>
> > It only matters for minimal builds, since I don't know any real
> VM out
> > there which does not come with NMT.
> >
> > NMT comes with a few static data, but those are only a few KB and
> we could
> > instead allocate them on demand. NMT is not difficult to port
> either, which
> > would be another reason to keep it optional.
> >
> > What do you think?
>
> I think you always need NMT present for your changes in JDK-8277822 to
> be valid! :)
>
>
> Well, not necessarily. You lose fences in compact debug builds, but
> other than that, it still works.
?? But you removed the os.cpp logic for guarded memory, relying on NMT
to do that, and NMT may not be present.
David
-----
>
> I don't know who, if anyone, uses a minimal VM these days. If the NMT
> code doesn't add much to the disk or memory footprint then I think we
> could decide to make it non-optional.
>
>
> Let's hear others. It is not that important. I was mainly eyeing the
> stub interface to MemTracker for INCLUDE_NMT=false, because I routinely
> forget about that one when changing NMT and then break the minimal build.
>
> Thanks, Thomas
>
> Cheers,
> David
> -----
>
> > Thanks, Thomas
>
More information about the hotspot-runtime-dev
mailing list