Skip to content

Commit ecc4e00

Browse files
authored
HADOOP-19371. JVM GC Metrics supports ZGC pause time and count (#7230) Contributed by cxzl25.
Reviewed-by: Tao Li <[email protected]> Reviewed-by: Cheng Pan <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
1 parent 3bf43b4 commit ecc4e00

File tree

1 file changed

+7
-0
lines changed
  • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source

1 file changed

+7
-0
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/source/JvmMetrics.java

+7
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ private void getGcUsage(MetricsRecordBuilder rb) {
181181
long count = 0;
182182
long timeMillis = 0;
183183
for (GarbageCollectorMXBean gcBean : gcBeans) {
184+
if (gcBean.getName() != null) {
185+
String name = gcBean.getName();
186+
// JDK-8265136 Skip concurrent phase
187+
if (name.startsWith("ZGC") && name.endsWith("Cycles")) {
188+
continue;
189+
}
190+
}
184191
long c = gcBean.getCollectionCount();
185192
long t = gcBean.getCollectionTime();
186193
MetricsInfo[] gcInfo = getGcInfo(gcBean.getName());

0 commit comments

Comments
 (0)