Integrated: JDK-8261238: NMT should not limit baselining by size threshold
Thomas Stuefe
stuefe at openjdk.java.net
Mon Apr 26 04:59:45 UTC 2021
On Fri, 5 Feb 2021 15:17:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> NMT is a very useful tool to detect memory leaks. Its easy to use, relatively cheap and requires almost zero setup.
>
> But it artificially limits output to call sites with >1K total memory consumption. That is not helpful, as it confuses the developer and obscures possible memory leaks. It also introduces subtle display errors in that callsites suddenly seem to appear, when comparing to the baseline, with a load of >1K when in fact they had been there already when the baseline was taken.
>
> I propose to remove the 1K limit completely. This will marginally increase the costs of taking "detail" NMT reports by about 210K for a single report, 420K for a report done using a baseline.
>
> If this is really a problem preventing us from getting more precise NMT output (really?) there are possibilities to decrease the cost again by sharing call stacks by reference instead of copying them around. I have a patch in work which does just that (https://bugs.openjdk.java.net/browse/JDK-8261491), but I honestly think adding 200-400K *temporarily* during NMT detail reporting would not be such a big deal.
This pull request has now been integrated.
Changeset: 578a0b3c
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/578a0b3c
Stats: 10 lines in 2 files changed: 3 ins; 4 del; 3 mod
8261238: NMT should not limit baselining by size threshold
Reviewed-by: zgu, mdoerr
-------------
PR: https://git.openjdk.java.net/jdk/pull/2428
More information about the hotspot-runtime-dev
mailing list