The implementation of G1 support into the SA (7059019) has been inconsistent with what the other GCs do wrt the jmap -heap output. G1 only prints whole heap information whereas the other GCs print per-heap space information. Here's an example. G1:
Heap Usage:
Garbage-First (G1) Heap
region size = 1048576 (1.0MB)
regions = 20
capacity = 20971520 (20.0MB)
used = 7154320 (6.8228912353515625MB)
free = 13817200 (13.177108764648438MB)
34.11445617675781% used
Perm Generation:
capacity = 16777216 (16.0MB)
used = 2570176 (2.45111083984375MB)
free = 14207040 (13.54888916015625MB)
15.319442749023438% used
ParallelGC:
Heap Usage:
PS Young Generation
Eden Space:
capacity = 17301504 (16.5MB)
used = 14982784 (14.2886962890625MB)
free = 2318720 (2.2113037109375MB)
86.59815932765152% used
From Space:
capacity = 2883584 (2.75MB)
used = 0 (0.0MB)
free = 2883584 (2.75MB)
0.0% used
To Space:
capacity = 2883584 (2.75MB)
used = 0 (0.0MB)
free = 2883584 (2.75MB)
0.0% used
PS Old Generation
capacity = 44040192 (42.0MB)
used = 240248 (0.22911834716796875MB)
free = 43799944 (41.77088165283203MB)
0.5455198742094494% used
PS Perm Generation
capacity = 16777216 (16.0MB)
used = 2574864 (2.4555816650390625MB)
free = 14202352 (13.544418334960938MB)
15.34738540649414% used
We should update the SA so that it can also print the per-heap space information with G1 like ParalleGC and the other GCs.