< prev index next >

test/hotspot/jtreg/runtime/CompressedOops/CompressedClassSpaceSize.java

Print this page

66         // Make sure the minimum size is set correctly and printed
67         // (Note: ccs size are rounded up to the next larger root chunk boundary (16m).
68         // Note that this is **reserved** size and does not affect rss.
69         pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
70                                                    "-XX:CompressedClassSpaceSize=1m",
71                                                    "-Xlog:gc+metaspace=trace",
72                                                    "-version");
73         output = new OutputAnalyzer(pb.start());
74         output.shouldMatch("Compressed class space.*16777216")
75               .shouldHaveExitValue(0);
76 
77 
78         // Make sure the maximum size is set correctly and printed
79         pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
80                                                    "-XX:CompressedClassSpaceSize=3g",
81                                                    "-Xlog:gc+metaspace=trace",
82                                                    "-version");
83         output = new OutputAnalyzer(pb.start());
84         output.shouldMatch("Compressed class space.*3221225472")
85               .shouldHaveExitValue(0);
86 
87 
88         pb = ProcessTools.createJavaProcessBuilder("-XX:-UseCompressedClassPointers",
89                                                    "-XX:CompressedClassSpaceSize=1m",
90                                                    "-version");
91         output = new OutputAnalyzer(pb.start());
92         output.shouldContain("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used")
93               .shouldHaveExitValue(0);
94     }
95 }

66         // Make sure the minimum size is set correctly and printed
67         // (Note: ccs size are rounded up to the next larger root chunk boundary (16m).
68         // Note that this is **reserved** size and does not affect rss.
69         pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
70                                                    "-XX:CompressedClassSpaceSize=1m",
71                                                    "-Xlog:gc+metaspace=trace",
72                                                    "-version");
73         output = new OutputAnalyzer(pb.start());
74         output.shouldMatch("Compressed class space.*16777216")
75               .shouldHaveExitValue(0);
76 
77 
78         // Make sure the maximum size is set correctly and printed
79         pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
80                                                    "-XX:CompressedClassSpaceSize=3g",
81                                                    "-Xlog:gc+metaspace=trace",
82                                                    "-version");
83         output = new OutputAnalyzer(pb.start());
84         output.shouldMatch("Compressed class space.*3221225472")
85               .shouldHaveExitValue(0);








86     }
87 }
< prev index next >