Skip to content

Commit

Permalink
Merge branch '1.3.x' into 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Apr 12, 2021
2 parents b688f8c + b433283 commit da81cfb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,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 @@ -193,8 +193,8 @@ public void bindTo(MeterRegistry registry) {
}
}

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 da81cfb

Please sign in to comment.