comparison test/gc/g1/TestSummarizeRSetStatsThreads.java @ 20546:05b726bce3e6

8060116: After JDK-8047976 gc/g1/TestSummarizeRSetStatsThreads fails Summary: Also reviewed by: sangheon.kim@oracle.com Reviewed-by: brutisso
author mlarsson
date Tue, 14 Oct 2014 19:55:54 +0200
parents 7ec10139bf37
children
comparison
equal deleted inserted replaced
20545:ab4548891480 20546:05b726bce3e6
51 // check output to contain the string "Concurrent RS threads times (s)" followed by 51 // check output to contain the string "Concurrent RS threads times (s)" followed by
52 // the correct number of values in the next line. 52 // the correct number of values in the next line.
53 53
54 // a zero in refinement thread numbers indicates that the value in ParallelGCThreads should be used. 54 // a zero in refinement thread numbers indicates that the value in ParallelGCThreads should be used.
55 // Additionally use at least one thread. 55 // Additionally use at least one thread.
56 int expectedNumRefinementThreads = refinementThreads == 0 ? workerThreads : refinementThreads; 56 int expectedNumRefinementThreads = refinementThreads;
57 expectedNumRefinementThreads = Math.max(1, expectedNumRefinementThreads); 57
58 // create the pattern made up of n copies of a floating point number pattern 58 // create the pattern made up of n copies of a floating point number pattern
59 String numberPattern = String.format("%0" + expectedNumRefinementThreads + "d", 0) 59 String numberPattern = String.format("%0" + expectedNumRefinementThreads + "d", 0)
60 .replace("0", "\\s+\\d+\\.\\d+"); 60 .replace("0", "\\s+\\d+\\.\\d+");
61 String pattern = "Concurrent RS threads times \\(s\\)$" + numberPattern + "$"; 61 String pattern = "Concurrent RS threads times \\(s\\)$" + numberPattern + "$";
62 Matcher m = Pattern.compile(pattern, Pattern.MULTILINE).matcher(output.getStdout()); 62 Matcher m = Pattern.compile(pattern, Pattern.MULTILINE).matcher(output.getStdout());
71 public static void main(String[] args) throws Exception { 71 public static void main(String[] args) throws Exception {
72 if (!TestSummarizeRSetStatsTools.testingG1GC()) { 72 if (!TestSummarizeRSetStatsTools.testingG1GC()) {
73 return; 73 return;
74 } 74 }
75 // different valid combinations of number of refinement and gc worker threads 75 // different valid combinations of number of refinement and gc worker threads
76 runTest(0, 0); 76 runTest(1, 1);
77 runTest(0, 5); 77 runTest(1, 5);
78 runTest(5, 0); 78 runTest(5, 1);
79 runTest(10, 10); 79 runTest(10, 10);
80 runTest(1, 2); 80 runTest(1, 2);
81 runTest(4, 3); 81 runTest(4, 3);
82 } 82 }
83 } 83 }