JDK-7097048 : G1: extend the G1 SA changes to print per-heap space information
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-09-30
  • Updated: 2013-10-04
  • Resolved: 2012-01-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u2Fixed 8Fixed hs22Fixed
Related Reports
Relates :  
Relates :  
Description
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.

Comments
EVALUATION See main CR
22-10-2011

EVALUATION http://hg.openjdk.java.net/hsx/hsx22/hotspot/rev/aade124d1b1d
12-10-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/81aa07130d30
04-10-2011

EVALUATION See Description and Suggested Fix.
30-09-2011

SUGGESTED FIX It turns out this is a relatively easy fix. The changes for 7075646 maintain all the information needed in fields in the G1MonitoringSupport class (these are calculated automatically). So it should be easy to get that information from inside the SA (through a wrapper class).
30-09-2011