Skip to content

Commit

Permalink
Merge branch '1.11.x' into 1.12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Jan 18, 2024
2 parents 04668af + 18a9359 commit c3e51b6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ public void handleNotification(Notification notification, Object ref) {
}

// 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 long-lived
// heap size or
// after a major/non-generational GC.
if (longLivedAfter < longLivedBefore || shouldUpdateDataSizeMetrics(gcName)) {
// minor GC. To track the live data size we record the value if we see a
// reduction in the long-lived
// heap size or after a major/non-generational GC. In some cases,
// longLivedAfter is 0, we ignore those notifications, see: gh-4497.
if (longLivedAfter > 0 && (longLivedAfter < longLivedBefore || shouldUpdateDataSizeMetrics(gcName))) {
liveDataSize.set(longLivedAfter);
maxDataSize.set(longLivedPoolNames.stream().mapToLong(pool -> after.get(pool).getMax()).sum());
}
Expand Down

0 comments on commit c3e51b6

Please sign in to comment.