equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 /** |
25 /** |
26 * @test TestMemoryPools |
26 * @test TestMemoryPools |
27 * @key gc |
27 * @key gc |
|
28 * @requires vm.gc.Epsilon |
28 * @summary Test JMX memory pools |
29 * @summary Test JMX memory pools |
29 * @modules java.base/jdk.internal.misc |
30 * @modules java.base/jdk.internal.misc |
30 * java.management |
31 * java.management |
31 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+UseEpsilonGC -Xmx1g -Xms1g TestMemoryPools |
32 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx1g -Xms1g TestMemoryPools |
32 */ |
33 */ |
33 |
34 |
34 import java.lang.management.*; |
35 import java.lang.management.*; |
35 import java.util.*; |
36 import java.util.*; |
36 |
37 |
37 public class TestMemoryPools extends AbstractEpsilonTest { |
38 public class TestMemoryPools { |
38 |
39 |
39 public static void main(String[] args) throws Exception { |
40 public static void main(String[] args) throws Exception { |
40 if (!isEpsilonEnabled()) return; |
|
41 |
|
42 List<MemoryManagerMXBean> mms = ManagementFactory.getMemoryManagerMXBeans(); |
41 List<MemoryManagerMXBean> mms = ManagementFactory.getMemoryManagerMXBeans(); |
43 if (mms == null) { |
42 if (mms == null) { |
44 throw new RuntimeException("getMemoryManagerMXBeans is null"); |
43 throw new RuntimeException("getMemoryManagerMXBeans is null"); |
45 } |
44 } |
46 if (mms.isEmpty()) { |
45 if (mms.isEmpty()) { |