Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZGC generational memory managers #1007

Merged
merged 2 commits into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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