SUGGESTED FIX
I updated the format based on comments from John Coomes. Basically, I put region size and number of young / survivor regions on the same line and slightly changed their format.
{Heap before GC invocations=12 (full 3):
garbage-first heap total 26624K, used 22004K [0xf2400000, 0xf3e00000, 0xf5400000)
region size 1024K, 16 young (16384K), 2 survivors (2048K)
compacting perm gen total 16384K, used 3070K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf56ffa68, 0xf56ffc00, 0xf6400000)
No shared spaces configured.
15.982: [GC pause (young) 21M->9990K(28M), 0.1216863 secs]
Heap after GC invocations=13 (full 3):
garbage-first heap total 28672K, used 9990K [0xf2400000, 0xf4000000, 0xf5400000)
region size 1024K, 4 young (4096K), 4 survivors (4096K)
compacting perm gen total 16384K, used 3070K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf56ffa68, 0xf56ffc00, 0xf6400000)
No shared spaces configured.
}
{Heap before GC invocations=13 (full 3):
garbage-first heap total 28672K, used 21584K [0xf2400000, 0xf4000000, 0xf5400000)
region size 1024K, 16 young (16384K), 4 survivors (4096K)
compacting perm gen total 16384K, used 3077K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf57016b8, 0xf5701800, 0xf6400000)
No shared spaces configured.
16.570: [Full GC (System.gc()) 21M->566K(24M), 0.1898490 secs]
Heap after GC invocations=14 (full 4):
garbage-first heap total 24576K, used 566K [0xf2400000, 0xf3c00000, 0xf5400000)
region size 1024K, 0 young (0K), 0 survivors (0K)
compacting perm gen total 16384K, used 3075K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf5700dd0, 0xf5700e00, 0xf6400000)
No shared spaces configured.
}
|
SUGGESTED FIX
Instead of dumping information for all regions, the new format looks like this:
{Heap before GC invocations=14 (full 4):
garbage-first heap total 24576K, used 16950K [0xf2400000, 0xf3c00000, 0xf5400000)
region size 1024K
young regions 16 / 16384K survivor regions 0 / 0K
compacting perm gen total 16384K, used 3077K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf57014c0, 0xf5701600, 0xf6400000)
No shared spaces configured.
18.050: [GC pause (young) 16M->7684K(26M), 0.0515459 secs]
Heap after GC invocations=15 (full 4):
garbage-first heap total 31744K, used 7684K [0xf2400000, 0xf4300000, 0xf5400000)
region size 1024K
young regions 7 / 7168K survivor regions 7 / 7168K
compacting perm gen total 16384K, used 3077K [0xf5400000, 0xf6400000, 0xf9400000)
the space 16384K, 18% used [0xf5400000, 0xf57014c0, 0xf5701600, 0xf6400000)
No shared spaces configured.
}
However, I have left in the ability to dump the extended per-region information, guarded by the new flag -XX:+PrintHeapAtGCExtended, given that it might be helpful for debugging.
I also fixed a few small related things in the code:
- passing the right boolean when calling increment_total_collections() (in the case of Full GC, the code before was not increasing the full GC counter)
- moved the print_heap_before_gc() / print_heap_after_gc() calls from the gc_prologue() / gc_epilogue() methods to the methods that performance the collection, since the bracketing before was wrong.
|