50 * @test id=test-64bit-ccs-aggressivereclaim
51 * @summary Test the VM.metaspace command
52 * @requires vm.bits == "64"
53 * @library /test/lib
54 * @modules java.base/jdk.internal.misc
55 * java.management
56 * @run main/othervm -Dwith-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:MetaspaceReclaimPolicy=aggressive PrintMetaspaceDcmd
57 */
58
59 /*
60 * @test id=test-64bit-ccs-guarded
61 * @summary Test the VM.metaspace command
62 * @requires vm.bits == "64"
63 * @requires vm.debug == true
64 * @library /test/lib
65 * @modules java.base/jdk.internal.misc
66 * java.management
67 * @run main/othervm -Dwith-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UnlockDiagnosticVMOptions -XX:+MetaspaceGuardAllocations PrintMetaspaceDcmd
68 */
69
70 /*
71 * @test id=test-64bit-noccs
72 * @summary Test the VM.metaspace command
73 * @requires vm.bits == "64"
74 * @library /test/lib
75 * @modules java.base/jdk.internal.misc
76 * java.management
77 * @run main/othervm -Dwithout-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:-UseCompressedOops -XX:-UseCompressedClassPointers PrintMetaspaceDcmd
78 */
79
80 /*
81 * @test id=test-nospecified
82 * @summary Test the VM.metaspace command
83 * @requires vm.bits == "64"
84 * @library /test/lib
85 * @modules java.base/jdk.internal.misc
86 * java.management
87 * @run main/othervm -Dno-specified-flag -Xmx100M -XX:-UseCompressedOops -XX:-UseCompressedClassPointers PrintMetaspaceDcmd
88 */
89
90 /*
91 * @test test-32bit
92 * @summary Test the VM.metaspace command
93 * @requires vm.bits == "32"
94 * @library /test/lib
95 * @modules java.base/jdk.internal.misc
96 * java.management
97 * @run main/othervm -Dwithout-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M PrintMetaspaceDcmd
98 */
99
100 public class PrintMetaspaceDcmd {
101
102 private static void doTheNoSpecifiedPropTest() throws Exception {
103 ProcessBuilder pb = new ProcessBuilder();
104 OutputAnalyzer output;
105 // Grab my own PID
106 String pid = Long.toString(ProcessTools.getProcessId());
107
108 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.metaspace", "basic"});
109 output = new OutputAnalyzer(pb.start());
|
50 * @test id=test-64bit-ccs-aggressivereclaim
51 * @summary Test the VM.metaspace command
52 * @requires vm.bits == "64"
53 * @library /test/lib
54 * @modules java.base/jdk.internal.misc
55 * java.management
56 * @run main/othervm -Dwith-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:MetaspaceReclaimPolicy=aggressive PrintMetaspaceDcmd
57 */
58
59 /*
60 * @test id=test-64bit-ccs-guarded
61 * @summary Test the VM.metaspace command
62 * @requires vm.bits == "64"
63 * @requires vm.debug == true
64 * @library /test/lib
65 * @modules java.base/jdk.internal.misc
66 * java.management
67 * @run main/othervm -Dwith-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UnlockDiagnosticVMOptions -XX:+MetaspaceGuardAllocations PrintMetaspaceDcmd
68 */
69
70 /*
71 * @test test-32bit
72 * @summary Test the VM.metaspace command
73 * @requires vm.bits == "32"
74 * @library /test/lib
75 * @modules java.base/jdk.internal.misc
76 * java.management
77 * @run main/othervm -Dwithout-compressed-class-space -XX:MaxMetaspaceSize=201M -Xmx100M PrintMetaspaceDcmd
78 */
79
80 public class PrintMetaspaceDcmd {
81
82 private static void doTheNoSpecifiedPropTest() throws Exception {
83 ProcessBuilder pb = new ProcessBuilder();
84 OutputAnalyzer output;
85 // Grab my own PID
86 String pid = Long.toString(ProcessTools.getProcessId());
87
88 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.metaspace", "basic"});
89 output = new OutputAnalyzer(pb.start());
|