equal
deleted
inserted
replaced
55 String[] defaultArgs = new String[] { |
55 String[] defaultArgs = new String[] { |
56 "-XX:+UseG1GC", |
56 "-XX:+UseG1GC", |
57 "-Xmx10m", |
57 "-Xmx10m", |
58 "-XX:+ExplicitGCInvokesConcurrent", |
58 "-XX:+ExplicitGCInvokesConcurrent", |
59 "-XX:+UnlockDiagnosticVMOptions", |
59 "-XX:+UnlockDiagnosticVMOptions", |
60 "-XX:+G1PrintRegionLivenessInfo", |
|
61 "-XX:G1HeapRegionSize=1M", |
60 "-XX:G1HeapRegionSize=1M", |
62 "-XX:InitiatingHeapOccupancyPercent=0", |
61 "-XX:InitiatingHeapOccupancyPercent=0", |
63 }; |
62 }; |
64 |
63 |
65 finalargs.addAll(Arrays.asList(defaultArgs)); |
64 finalargs.addAll(Arrays.asList(defaultArgs)); |
77 } |
76 } |
78 |
77 |
79 public static void main(String[] args) throws Exception { |
78 public static void main(String[] args) throws Exception { |
80 String result; |
79 String result; |
81 |
80 |
82 result = runTest("-XX:+G1PrintRegionLivenessInfo"); |
81 result = runTest("-Xlog:gc+liveness=trace"); |
83 // check that we got region statistics output |
82 // check that we got region statistics output |
84 if (result.indexOf("PHASE") == -1) { |
83 if (result.indexOf("PHASE") == -1) { |
85 throw new RuntimeException("Unexpected output from -XX:+PrintRegionLivenessInfo found."); |
84 throw new RuntimeException("Unexpected output from -XX:+PrintRegionLivenessInfo found."); |
86 } |
85 } |
87 |
86 |
88 result = runTest("-XX:-G1PrintRegionLivenessInfo"); |
87 result = runTest("-Xlog:gc+liveness"); |
89 if (result.indexOf("remset") != -1) { |
88 if (result.indexOf("remset") != -1) { |
90 throw new RuntimeException("Should find remembered set information in output."); |
89 throw new RuntimeException("Should find remembered set information in output."); |
91 } |
90 } |
92 } |
91 } |
93 } |
92 } |