RFR: 8297718: Make NMT free:ing protocol more granular [v2]
Gerard Ziemski
gziemski at openjdk.org
Wed Dec 7 16:25:12 UTC 2022
On Wed, 7 Dec 2022 10:58:41 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> > But more importantly, we would **NOT** miss this code:
> > ```
> > if (!enabled()) {
> > return memblock;
> > }
> > ```
> >
> > As it is now, we are calling NMT code always, even when NMT is OFF.
> > You can of course add that check itself back to your re-implementation copy directly in `os::realloc()`, but like I said, we should just modify the original `MemTracker::record_free()` method (and possibly give it a more apt name now that we can skip the record_free portion of it) and re-use the already existing code.
>
> You lost me here. Where would that be? Note that in os::realloc(), we are in the code path for NMT enabled already.
Ah I see it now, it was hiding in the unexpanded portion of the review code - I just needed to click the UI arrow up to reveal it.
-------------
PR: https://git.openjdk.org/jdk/pull/11390
More information about the hotspot-runtime-dev
mailing list