< prev index next >

test/gc/g1/TestRemsetLoggingThreads.java

Print this page

        

@@ -20,11 +20,11 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /*
- * @test TestSummarizeRSetStatsThreads
+ * @test TestRemsetLoggingThreads
  * @bug 8025441
  * @summary Ensure that various values of worker threads/concurrent
  * refinement threads do not crash the VM.
  * @key gc
  * @library /testlibrary

@@ -36,44 +36,38 @@
 import java.util.regex.Pattern;
 
 import jdk.test.lib.ProcessTools;
 import jdk.test.lib.OutputAnalyzer;
 
-public class TestSummarizeRSetStatsThreads {
+public class TestRemsetLoggingThreads {
 
   private static void runTest(int refinementThreads, int workerThreads) throws Exception {
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
                                                               "-XX:+UnlockDiagnosticVMOptions",
-                                                              "-XX:+G1SummarizeRSetStats",
+                                                              "-Xlog:gc+remset+exit=trace",
                                                               "-XX:G1ConcRefinementThreads=" + refinementThreads,
                                                               "-XX:ParallelGCThreads=" + workerThreads,
                                                               "-version");
 
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
 
-    // check output to contain the string "Concurrent RS threads times (s)" followed by
-    // the correct number of values in the next line.
-
     // a zero in refinement thread numbers indicates that the value in ParallelGCThreads should be used.
     // Additionally use at least one thread.
     int expectedNumRefinementThreads = refinementThreads;
 
-    // create the pattern made up of n copies of a floating point number pattern
-    String numberPattern = String.format("%0" + expectedNumRefinementThreads + "d", 0)
-      .replace("0", "\\s+\\d+\\.\\d+");
-    String pattern = "Concurrent RS threads times \\(s\\)$" + numberPattern + "$";
+    String pattern = "Concurrent RS threads times \\(s\\)$";
     Matcher m = Pattern.compile(pattern, Pattern.MULTILINE).matcher(output.getStdout());
 
     if (!m.find()) {
       throw new Exception("Could not find correct output for concurrent RS threads times in stdout," +
         " should match the pattern \"" + pattern + "\", but stdout is \n" + output.getStdout());
     }
     output.shouldHaveExitValue(0);
   }
 
   public static void main(String[] args) throws Exception {
-    if (!TestSummarizeRSetStatsTools.testingG1GC()) {
+    if (!TestRemsetLoggingTools.testingG1GC()) {
       return;
     }
     // different valid combinations of number of refinement and gc worker threads
     runTest(1, 1);
     runTest(1, 5);
< prev index next >