< prev index next >

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

Print this page

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

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








87     }
88 }
< prev index next >