RFR: JDK-8319314: NMT detail report slow or hangs for large number of mappings

Thomas Stuefe stuefe at openjdk.org
Fri Nov 3 12:35:19 UTC 2023


If a lot of mappings have been registered with NMT, NMT detail report may get so slow as to hang seemingly. 

100 k mappings will take > 1 minute
1 million mappings never returns (I canceled the test after 90 minutes)

We burn all the time doing a sorted insert into the target array of the MemBaseline object. That sorted insert is pointless since the source array is already sorted by region base address.

Omitting the pointless sort drops the runtime for 1 million mappings from > 90 minutes to 48 seconds.

Tests: Tested locally. GHAs (Windows error unrelated).

-------------

Commit messages:
 - Johan feedback
 - Merge branch 'master' into JDK-8319314-NMT-detail-report-slow-or-hangs-for-large-number-of-mappings
 - JDK-8319314-NMT-detail-report-slow-or-hangs-for-large-number-of-mappings

Changes: https://git.openjdk.org/jdk/pull/16480/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16480&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8319314
  Stats: 18 lines in 1 file changed: 8 ins; 5 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/16480.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16480/head:pull/16480

PR: https://git.openjdk.org/jdk/pull/16480


More information about the hotspot-runtime-dev mailing list