< prev index next >
test/jdk/jdk/jfr/event/gc/detailed/PromotionEvent.java
Print this page
@@ -68,11 +68,12 @@
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()))) {
+ || "G1 Young".equals(gcBean.getName())
+ || "ParNew".equals(gcBean.getName())) {
ycBean = gcBean;
}
if (ycBean != null) {
break;
@@ -82,11 +83,11 @@
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
+ System.gc(); // Clear nursery before recording
// Get total GC count before recording
for (GarbageCollectorMXBean gcBean : gcBeans) {
startGCCount += gcBean.getCollectionCount();
}
< prev index next >