< prev index next >

test/jdk/jdk/jfr/event/gc/detailed/PromotionEvent.java

Print this page

        

*** 68,78 **** List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean gcBean : gcBeans) { if ("PS Scavenge".equals(gcBean.getName()) || "G1 Young Generation".equals(gcBean.getName()) ! || ("ParNew".equals(gcBean.getName()))) { ycBean = gcBean; } if (ycBean != null) { break; --- 68,79 ---- List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean gcBean : gcBeans) { if ("PS Scavenge".equals(gcBean.getName()) || "G1 Young Generation".equals(gcBean.getName()) ! || "G1 Young".equals(gcBean.getName()) ! || "ParNew".equals(gcBean.getName())) { ycBean = gcBean; } if (ycBean != null) { break;
*** 82,92 **** if (ycBean == null) { assertNotNull(ycBean, "Test failed since the MXBean for the Young Collector could not be found."); return; // To remove IDE warning } ! System.gc(); // Clear nusery before recording // Get total GC count before recording for (GarbageCollectorMXBean gcBean : gcBeans) { startGCCount += gcBean.getCollectionCount(); } --- 83,93 ---- if (ycBean == null) { assertNotNull(ycBean, "Test failed since the MXBean for the Young Collector could not be found."); return; // To remove IDE warning } ! System.gc(); // Clear nursery before recording // Get total GC count before recording for (GarbageCollectorMXBean gcBean : gcBeans) { startGCCount += gcBean.getCollectionCount(); }
< prev index next >