Skip to content

Commit

Permalink
8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Exp…
Browse files Browse the repository at this point in the history
…ected a higher ratio between stack committed and reserved

8325218: gc/parallel/TestAlwaysPreTouchBehavior.java fails

Reviewed-by: tschatzl
Backport-of: 31e8deb
  • Loading branch information
stefank committed Jun 27, 2024
1 parent b5fbdb2 commit d7b9454
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ gc/epsilon/TestMemoryMXBeans.java 8206434 generic-all
gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java 8156755 generic-all
gc/g1/logging/TestG1LoggingFailure.java 8169634 generic-all
gc/g1/humongousObjects/TestHeapCounters.java 8178918 generic-all
gc/parallel/TestAlwaysPreTouchBehavior.java 8325218 linux-all
gc/TestAllocHumongousFragment.java#adaptive 8298781 generic-all
gc/TestAllocHumongousFragment.java#aggressive 8298781 generic-all
gc/TestAllocHumongousFragment.java#iu-aggressive 8298781 generic-all
Expand All @@ -119,7 +118,6 @@ runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all
runtime/ErrorHandling/TestDwarf.java#checkDecoder 8305489 linux-all
runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le
runtime/cds/appcds/customLoader/HelloCustom_JFR.java 8241075 linux-all,windows-x64
runtime/Thread/TestAlwaysPreTouchStacks.java 8324781 linux-all

applications/jcstress/accessAtomic.java 8325984 generic-all
applications/jcstress/acqrel.java 8325984 generic-all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @requires os.family == "linux"
* @requires os.maxMemory > 2G
* @library /test/lib
* @run main/othervm -Xmx1g -Xms1g -XX:+UseParallelGC -XX:+AlwaysPreTouch gc.parallel.TestAlwaysPreTouchBehavior
* @run main/othervm -Xmx1g -Xms1g -XX:+UseParallelGC -XX:+AlwaysPreTouch -XX:+UnlockDiagnosticVMOptions -XX:-UseMadvPopulateWrite gc.parallel.TestAlwaysPreTouchBehavior
*/
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
Expand Down Expand Up @@ -77,4 +77,3 @@ public static void main(String [] args) {
Asserts.assertGreaterThanOrEqual(rss, committedMemory, "RSS of this process(" + rss + "kb) should be bigger than or equal to committed heap mem(" + committedMemory + "kb)");
}
}

14 changes: 9 additions & 5 deletions test/hotspot/jtreg/runtime/Thread/TestAlwaysPreTouchStacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.concurrent.CyclicBarrier;
Expand Down Expand Up @@ -89,14 +90,17 @@ public static void main(String[] args) throws Exception {
// should show up with fully - or almost fully - committed thread stacks.

} else {

ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
ArrayList<String> vmArgs = new ArrayList<>();
Collections.addAll(vmArgs,
"-XX:+UnlockDiagnosticVMOptions",
"-Xmx100M",
"-XX:+AlwaysPreTouchStacks",
"-XX:NativeMemoryTracking=summary", "-XX:+PrintNMTStatistics",
"TestAlwaysPreTouchStacks",
"test");
"-XX:NativeMemoryTracking=summary", "-XX:+PrintNMTStatistics");
if (System.getProperty("os.name").contains("Linux")) {
vmArgs.add("-XX:-UseMadvPopulateWrite");
}
Collections.addAll(vmArgs, "TestAlwaysPreTouchStacks", "test");
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(vmArgs);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.reportDiagnosticSummary();

Expand Down

1 comment on commit d7b9454

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.