|
35 | 35 | import jdk.test.lib.process.ProcessTools;
|
36 | 36 |
|
37 | 37 | public class StressAsyncUL {
|
38 |
| - static void analyze_output(String... args) throws Exception { |
| 38 | + static void analyze_output(boolean stalling_mode, String... args) throws Exception { |
39 | 39 | ProcessBuilder pb =
|
40 | 40 | ProcessTools.createLimitedTestJavaProcessBuilder(args);
|
41 | 41 | OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
42 | 42 | output.shouldHaveExitValue(0);
|
| 43 | + if (stalling_mode) { |
| 44 | + output.shouldNotContain("messages dropped due to async logging"); |
| 45 | + } |
43 | 46 | }
|
44 | 47 | public static void main(String[] args) throws Exception {
|
45 |
| - analyze_output("-Xlog:async:drop", "-Xlog:all=trace", InnerClass.class.getName()); |
46 |
| - analyze_output("-Xlog:async:stall", "-Xlog:all=trace", InnerClass.class.getName()); |
| 48 | + analyze_output(false, "-Xlog:async:drop", "-Xlog:all=trace", InnerClass.class.getName()); |
| 49 | + analyze_output(true, "-Xlog:async:stall", "-Xlog:all=trace", InnerClass.class.getName()); |
47 | 50 | // Stress test with a very small buffer. Note: Any valid buffer size must be able to hold a flush token.
|
48 | 51 | // Therefore the size of the buffer cannot be zero.
|
49 |
| - analyze_output("-Xlog:async:drop", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); |
50 |
| - analyze_output("-Xlog:async:stall", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); |
| 52 | + analyze_output(false, "-Xlog:async:drop", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); |
| 53 | + analyze_output(true, "-Xlog:async:stall", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); |
51 | 54 | }
|
52 | 55 |
|
53 | 56 | public static class InnerClass {
|
|
1 commit comments
openjdk-notifier[bot] commentedon Feb 28, 2025
Review
Issues