Extend gc+heap=info output with subspace occupancy info, for young gen
Peter B. Kessler
Peter.Kessler at ACM.ORG
Fri Apr 19 17:01:52 UTC 2019
Won't to-space always be empty in these reports? If so, why bother printing it? The size of to-space is of interest, but maybe not at the "info" level.
... peter
> On Apr 18, 2019, at 9:26 PM, Tony Printezis <tprintezis at twitter.com> wrote:
>
> Hi all,
>
> I’ve been looking at the gc+heap=info output for post-9 JDKs:
>
> [16.607s][info][gc,heap ] GC(55) PSYoungGen: 1383840K->1600K(1612800K)
> [16.607s][info][gc,heap ] GC(55) ParOldGen: 1348K->1348K(253952K)
>
> Unfortunately, there doesn’t seem to be a way to get the eden and survivor space occupancy at the info level. If we use gc+heap=debug we get the old PrintHeapAtGC output (twice per GC: once before and once after):
>
> [4.194s][debug][gc,heap ] GC(11) Heap before GC invocations=12 (full 0): PSYoungGen total 1612800K, used 1383968K [0x000000008f800000, 0x0000000100000000, 0x0000000100000000)
> [4.194s][debug][gc,heap ] GC(11) eden space 1382400K, 100% used [0x000000008f800000,0x00000000e3e00000,0x00000000e3e00000)
> [4.194s][debug][gc,heap ] GC(11) from space 230400K, 0% used [0x00000000e3e00000,0x00000000e3f88000,0x00000000f1f00000)
> [4.194s][debug][gc,heap ] GC(11) to space 230400K, 0% used [0x00000000f1f00000,0x00000000f1f00000,0x0000000100000000)
> [4.194s][debug][gc,heap ] GC(11) ParOldGen total 253952K, used 1296K [0x0000000080000000, 0x000000008f800000, 0x000000008f800000)
> [4.194s][debug][gc,heap ] GC(11) object space 253952K, 0% used [0x0000000080000000,0x00000000801440e0,0x000000008f800000)
> [4.194s][debug][gc,heap ] GC(11) Metaspace used 7923K, capacity 8115K, committed 8320K, reserved 1056768K
> [4.194s][debug][gc,heap ] GC(11) class space used 722K, capacity 790K, committed 896K, reserved 1048576K
>
> This contains the required information but it also increases the log size by 4x to 5x as it contains a lot of mostly useless and duplicated information.
>
> I have a couple of changes (for ParNew and ParallelGC) to extend the gc+heap=info output with the occupancy info for eden and the survivors - the output looks like this:
>
> [16.607s][info][gc,heap ] GC(55) PSYoungGen: 1383840K->1600K(1612800K) Eden: 1382400K->0K(1382400K) From: 1440K->1600K(230400K) To: 0K->0K(230400K)
> [16.607s][info][gc,heap ] GC(55) ParOldGen: 1348K->1348K(253952K)
>
> Is there interest in this? The changes are straightforward.
>
> Tony
>
>
>
> —————
> Tony Printezis | @TonyPrintezis | tprintezis at twitter.com <mailto:tprintezis at twitter.com>
More information about the hotspot-gc-dev
mailing list