RFR: 8157023: Integrate NMT with JFR [v2]
Thomas Stuefe
stuefe at openjdk.org
Mon Dec 5 13:30:10 UTC 2022
On Mon, 5 Dec 2022 13:08:50 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
> I can take a stab at it. Only thing I'm not clear about exactly what you mean is: we could hide the nitty gritty of result retrieving (e.g. mtNone, mtChunk handling etc) at least in part from using code like JFR.
Reporting is not always 1:1 wrt MEMFLAGS. Some are special:
- mtNone should not really exist, and we want to remove it. StefanK did some preparatory work already. NMT reporter just prints an empty line, I think. I would just leave it out.
- mtChunk is special because Arenas are in this weird role where they are arena memory, but then they are malloced. So reporting must report mtChunk allocations for chunks that belong to an arena under the arena's MEMFLAG. In my experiences, this breaks easily. But I see that is taken care of as part of the baseline() function (See MallocMemorySnapshot::make_adjustment()). So maybe you don't want to do anything here.
But if you follow the breadcrumb of what MemReporter does, you should be fine.
p.s. my peak display change is up for review, I would be happy if you could give it an eye? https://github.com/openjdk/jdk/pull/11497
-------------
PR: https://git.openjdk.org/jdk/pull/11449
More information about the hotspot-dev
mailing list