Skip to content

Commit

Permalink
Add ZGC generational memory managers (#1007)
Browse files Browse the repository at this point in the history
Update the HelperFunctions to include the ZGC generational
memory managers and properly match Shenandoah and ZGC
generational pool names.
  • Loading branch information
DanielThomas authored Nov 18, 2022
1 parent 669c362 commit 10dc725
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ private static Map<String, GcType> knownCollectors() {
m.put("ZGC", GcType.OLD);
m.put("ZGC Cycles", GcType.OLD);
m.put("ZGC Pauses", GcType.OLD);
m.put("ZGC Minor Cycles", GcType.YOUNG);
m.put("ZGC Minor Pauses", GcType.YOUNG);
m.put("ZGC Major Cycles", GcType.OLD);
m.put("ZGC Major Pauses", GcType.OLD);
m.put("Shenandoah Cycles", GcType.OLD);
m.put("Shenandoah Pauses", GcType.OLD);
return Collections.unmodifiableMap(m);
Expand All @@ -61,15 +65,16 @@ static boolean isOldGcType(String name) {

/** Returns true if memory pool name matches an old generation pool. */
static boolean isOldGenPool(String name) {
return name.endsWith("Old Gen")
return name.contains("Old Gen")
|| name.endsWith("Tenured Gen")
|| "Shenandoah".equals(name)
|| "ZHeap".equals(name);
}

/** Returns true if memory pool name matches an young generation pool. */
static boolean isYoungGenPool(String name) {
return name.endsWith("Eden Space")
return name.contains("Young Gen")
|| name.endsWith("Eden Space")
|| "Shenandoah".equals(name)
|| "ZHeap".equals(name);
}
Expand Down

0 comments on commit 10dc725

Please sign in to comment.