Skip to content

Commit 0ef34cd

Browse files
committed
don't log "GC cleanup" events without memory information
1 parent 9cf6058 commit 0ef34cd

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderSun1_6_0G1.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public class DataReaderSun1_6_0G1 extends AbstractDataReaderSun {
116116
HEAP_STRINGS.add("class space"); // java 8
117117
HEAP_STRINGS.add("}");
118118
HEAP_STRINGS.add("[0x"); // special case of line following one containing a concurrent event mixed with heap information
119+
HEAP_STRINGS.add("total"); // special case of line following one containing a concurrent event mixed with heap information
119120
}
120121

121122
/** is true, if "[Times ..." information is present in the gc log */
@@ -413,7 +414,9 @@ else if (line.indexOf(INCOMPLETE_CONCURRENT_EVENT_INDICATOR) >= 0) {
413414

414415
if (event.getTotal() == 0) {
415416
// is currently the case for jdk 1.7.0_02 which changed the memory format
416-
LOG.warning("line " + lineNumber + ": no memory information found (" + event.toString() + ")");
417+
// as of 1.7.0_25 for "GC cleanup" events, there seem to be rare cases, where this just happens
418+
// => don't log as warning; just log on debug level
419+
if (LOG.isLoggable(Level.FINE)) LOG.fine("line " + lineNumber + ": no memory information found (" + event.toString() + ")");
417420
}
418421
model.add(event);
419422

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
2.385: {Heap before GC invocations=166 (full 32):
2-
[GC concurrent-root-region-scan-end, 0.0000684]
3-
garbage-first heap 2.385: total 131072K, used 131072K[GC concurrent-mark-start]
4-
[0x04800000, 0x0c800000, 0x0c800000)
5-
region size 8192K, 1 young (8192K), 1 survivors (8192K)
6-
compacting perm gen total 8192K, used 1626K [0x0c800000, 0x0d000000, 0x10800000)
7-
the space 8192K, 19% used [0x0c800000, 0x0c996bd0, 0x0c996c00, 0x0d000000)
8-
No shared spaces configured.
9-
2.385: [Full GC 128M->57M(128M), 0.0326402 secs]
10-
[Times: user=0.05 sys=0.00, real=0.05 secs]
11-
Heap after GC invocations=167 (full 33):
12-
garbage-first heap total 131072K, used 59219K [0x04800000, 0x0c800000, 0x0c800000)
13-
region size 8192K, 0 young (0K), 0 survivors (0K)
14-
compacting perm gen total 8192K, used 1626K [0x0c800000, 0x0d000000, 0x10800000)
15-
the space 8192K, 19% used [0x0c800000, 0x0c996bd0, 0x0c996c00, 0x0d000000)
16-
No shared spaces configured.
17-
}
1+
2.385: {Heap before GC invocations=166 (full 32):
2+
[GC concurrent-root-region-scan-end, 0.0000684]
3+
garbage-first heap 2.385: total 131072K, used 131072K[GC concurrent-mark-start]
4+
[0x04800000, 0x0c800000, 0x0c800000)
5+
region size 8192K, 1 young (8192K), 1 survivors (8192K)
6+
compacting perm gen total 8192K, used 1626K [0x0c800000, 0x0d000000, 0x10800000)
7+
the space 8192K, 19% used [0x0c800000, 0x0c996bd0, 0x0c996c00, 0x0d000000)
8+
No shared spaces configured.
9+
2.385: [Full GC 128M->57M(128M), 0.0326402 secs]
10+
[Times: user=0.05 sys=0.00, real=0.05 secs]
11+
Heap after GC invocations=167 (full 33):
12+
garbage-first heap total 131072K, used 59219K [0x04800000, 0x0c800000, 0x0c800000)
13+
region size 8192K, 0 young (0K), 0 survivors (0K)
14+
compacting perm gen total 8192K, used 1626K [0x0c800000, 0x0d000000, 0x10800000)
15+
the space 8192K, 19% used [0x0c800000, 0x0c996bd0, 0x0c996c00, 0x0d000000)
16+
No shared spaces configured.
17+
}

0 commit comments

Comments
 (0)