JDK-8289162 : runtime/NMT/ThreadedMallocTestType.java should print out memory allocations to help debug
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-06-24
  • Updated: 2022-10-03
  • Resolved: 2022-09-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 b17Fixed
Related Reports
Relates :  
Description
In https://bugs.openjdk.org/browse/JDK-8286345 the test itself looks like it could pass except the child process gets stuck and blocks the test itself.

We should print out memory allocations values to help debug.
Comments
Changeset: 739fdec7 Author: Gerard Ziemski <gziemski@openjdk.org> Date: 2022-09-27 16:27:32 +0000 URL: https://git.openjdk.org/jdk/commit/739fdec7ea44be7ab12fdf418793276d581e58fe
27-09-2022

Moved from hotspot/test -> hotspot/runtime. In general, fixes for tests belong in the area that owns the test. In this case, it's NMT so the Runtime team. We rarely use hotspot/test and when we do it is typically for changes to the test harness/infrastructure.
28-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9675 Date: 2022-07-28 14:42:26 +0000
28-07-2022

diff --git a/test/hotspot/jtreg/runtime/NMT/ThreadedMallocTestType.java b/test/hotspot/jtreg/runtime/NMT/ThreadedMallocTestType.java index 120df333ea1..9bd2181006b 100644 --- a/test/hotspot/jtreg/runtime/NMT/ThreadedMallocTestType.java +++ b/test/hotspot/jtreg/runtime/NMT/ThreadedMallocTestType.java @@ -61,6 +61,10 @@ public class ThreadedMallocTestType { allocThread.start(); allocThread.join(); + System.out.println("memAlloc1:"+memAlloc1); + System.out.println("memAlloc2:"+memAlloc2); + System.out.println("memAlloc3:"+memAlloc3); + // Run 'jcmd <pid> VM.native_memory summary' pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary"}); output = new OutputAnalyzer(pb.start());
24-06-2022