< prev index next >

test/jdk/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java

Print this page

        

*** 73,83 **** public static void main(String a[]) throws Throwable { final String main = "CollectionUsageThreshold$TestMain"; RunUtil.runTestKeepGcOpts(main); RunUtil.runTestClearGcOpts(main, "-XX:+UseSerialGC"); RunUtil.runTestClearGcOpts(main, "-XX:+UseParallelGC"); ! RunUtil.runTestClearGcOpts(main, "-XX:+UseG1GC"); if (!Compiler.isGraalEnabled()) { // Graal does not support CMS RunUtil.runTestClearGcOpts(main, "-XX:+UseConcMarkSweepGC"); } } --- 73,84 ---- public static void main(String a[]) throws Throwable { final String main = "CollectionUsageThreshold$TestMain"; RunUtil.runTestKeepGcOpts(main); RunUtil.runTestClearGcOpts(main, "-XX:+UseSerialGC"); RunUtil.runTestClearGcOpts(main, "-XX:+UseParallelGC"); ! RunUtil.runTestClearGcOpts(main, "-XX:+UseG1GC", "-XX:-G1UseLegacyMonitoring"); ! RunUtil.runTestClearGcOpts(main, "-XX:+UseG1GC", "-XX:+G1UseLegacyMonitoring"); if (!Compiler.isGraalEnabled()) { // Graal does not support CMS RunUtil.runTestClearGcOpts(main, "-XX:+UseConcMarkSweepGC"); } }
*** 145,159 **** } // Find the Old generation which supports low memory detection for (MemoryPoolMXBean p : pools) { if (p.isUsageThresholdSupported() && p.isCollectionUsageThresholdSupported()) { ! if (p.getName().toLowerCase().contains("perm")) { // if we have a "perm gen" pool increase the number of expected // memory pools by one. numMemoryPools++; } PoolRecord pr = new PoolRecord(p); result.put(p.getName(), pr); if (result.size() == numMemoryPools) { break; } --- 146,166 ---- } // Find the Old generation which supports low memory detection for (MemoryPoolMXBean p : pools) { if (p.isUsageThresholdSupported() && p.isCollectionUsageThresholdSupported()) { ! String poolName = p.getName().toLowerCase(); ! if (poolName.contains("perm")) { // if we have a "perm gen" pool increase the number of expected // memory pools by one. numMemoryPools++; } + if (poolName.contains("g1 humongous space")) { + // if we have a "g1 humongous space" pool increase the number of expected + // memory pools by one. + numMemoryPools++; + } PoolRecord pr = new PoolRecord(p); result.put(p.getName(), pr); if (result.size() == numMemoryPools) { break; }
< prev index next >