Skip to content

Commit

Permalink
Merge branch '1.5.x' into 1.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Apr 12, 2021
2 parents 33f96f8 + da81cfb commit 0221f7e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void bindTo(MeterRegistry registry) {
// Some GC implementations such as G1 can reduce the old gen size as part of a minor GC. To track the
// live data size we record the value if we see a reduction in the old gen heap size or
// after a major GC.
if (oldAfter < oldBefore || isMajorGc(notificationInfo)) {
if (oldAfter < oldBefore || isMajorGc(notificationInfo.getGcName())) {
liveDataSize.set(oldAfter);
final long oldMaxAfter = after.get(oldGenPoolName).getMax();
maxDataSize.set(oldMaxAfter);
Expand Down Expand Up @@ -215,8 +215,8 @@ private void countPoolSizeDelta(Map<String, MemoryUsage> before, Map<String, Mem
}
}

private boolean isMajorGc(GarbageCollectionNotificationInfo notificationInfo) {
return GcGenerationAge.fromGcName(notificationInfo.getGcName()) == GcGenerationAge.OLD;
private boolean isMajorGc(String gcName) {
return GcGenerationAge.fromGcName(gcName) == GcGenerationAge.OLD;
}

private static boolean isManagementExtensionsPresent() {
Expand Down

0 comments on commit 0221f7e

Please sign in to comment.