Skip to content

Commit

Permalink
SapMachine (SAP#1550): Fix test of new malloc trace
Browse files Browse the repository at this point in the history
  • Loading branch information
schmelter-sap committed Apr 26, 2024
1 parent 78be7dd commit f20e4f2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/hotspot/jtreg/runtime/malloctrace/MallocHooksTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,9 @@ private static ProcessBuilder runManyStacks(int nrOfOps, int size, int maxStack,
}

private static void testDumpPercentage(boolean bySize) throws Exception {
ProcessBuilder pb = runManyStacks(1024 * 1024 * 10, 1024 * 16, 5, 172369973,
"-Djava.library.path=" + System.getProperty("java.library.path"),
"-XX:MallocTraceStackDepth=12");
Process p = ProcessTools.startProcess("runManyStack", pb, x -> System.out.println("> " + x), null, -1, null);
Process p = runManyStacks(1024 * 1024 * 10, 1024 * 16, 5, 172369973,
"-Djava.library.path=" + System.getProperty("java.library.path"),
"-XX:MallocTraceStackDepth=12").start();
checkIsAttachable(p);
p.getInputStream().read();
OutputAnalyzer oa = bySize ? callJcmd(p, "MallocTrace.dump", "-percentage=90") :
Expand All @@ -592,10 +591,9 @@ private static void testDumpPercentage(boolean bySize) throws Exception {
}

private static void testUniqueStacks() throws Exception {
ProcessBuilder pb = runManyStacks(1024 * 1024 * 10, 1024 * 16, 12, 172369975,
"-Djava.library.path=" + System.getProperty("java.library.path"),
"-XX:MallocTraceStackDepth=14");
Process p = ProcessTools.startProcess("runManyStack", pb, x -> System.out.println("> " + x), null, -1, null);
Process p = runManyStacks(1024 * 1024 * 10, 1024 * 16, 12, 172369975,
"-Djava.library.path=" + System.getProperty("java.library.path"),
"-XX:MallocTraceStackDepth=14").start();
checkIsAttachable(p);
p.getInputStream().read();
OutputAnalyzer oa = callJcmd(p, "MallocTrace.dump", "-percentage=100");
Expand Down

0 comments on commit f20e4f2

Please sign in to comment.