equal
deleted
inserted
replaced
42 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
42 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
43 "-XX:+UseG1GC", |
43 "-XX:+UseG1GC", |
44 "-Xms" + heapSize + "m", |
44 "-Xms" + heapSize + "m", |
45 "-Xmx" + heapSize + "m", |
45 "-Xmx" + heapSize + "m", |
46 "-XX:G1HeapRegionSize=" + heapRegionSize + "m", |
46 "-XX:G1HeapRegionSize=" + heapRegionSize + "m", |
47 "-XX:+PrintGC", |
47 "-Xlog:gc", |
48 HumongousObjectAllocator.class.getName()); |
48 HumongousObjectAllocator.class.getName()); |
49 |
49 |
50 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
50 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
51 output.shouldContain("GC pause (G1 Humongous Allocation) (young) (initial-mark)"); |
51 output.shouldContain("Pause Initial Mark (G1 Humongous Allocation)"); |
52 output.shouldHaveExitValue(0); |
52 output.shouldHaveExitValue(0); |
53 } |
53 } |
54 |
54 |
55 static class HumongousObjectAllocator { |
55 static class HumongousObjectAllocator { |
56 public static void main(String [] args) { |
56 public static void main(String [] args) { |