JDK-8175312 : SA: clhsdb: Provide an improved heap summary for 'universe' for G1GC
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-02-21
  • Updated: 2019-08-15
  • Resolved: 2018-03-20
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 11
11 b07Fixed
Description
The heap parameters displayed for the clhsdb 'universe' command needs to be improved for G1GC. The current output is as follows:
hsdb> universe
Heap Parameters:
garbage-first heap [0x0000000725200000, 0x00000007c0000000] region size 1024K

This seems inadequate. One suggestion would be to list the various active regions (along with the type (eden, survivor, old, humungous, pinned, etc) along with the top and bottom addresses. This could be done under a special option if the output is too lengthy.

Comments
Modified 'universe' for G1GC to print details like: hsdb> universe Heap Parameters: garbage-first heap [0x0000000725200000, 0x00000007c0000000] region size 1024K G1 Heap: regions = 2478 capacity = 2598371328 (2478.0MB) used = 5242880 (5.0MB) free = 2593128448 (2473.0MB) 0.20177562550443906% used G1 Young Generation: Eden Space: regions = 5 capacity = 8388608 (8.0MB) used = 5242880 (5.0MB) free = 3145728 (3.0MB) 62.5% used Survivor Space: regions = 0 capacity = 0 (0.0MB) used = 0 (0.0MB) free = 0 (0.0MB) 0.0% used G1 Old Generation: regions = 0 capacity = 155189248 (148.0MB) used = 0 (0.0MB) free = 155189248 (148.0MB) 0.0% used ============================================== Adding a new clhsdb command "g1regiondetails" to display the region details, and modified the tests accordingly. hsdb> g1regiondetails Region Details: Region: 0x0000000725200000,0x0000000725200000,0x0000000725300000:Free Region: 0x0000000725300000,0x0000000725300000,0x0000000725400000:Free Region: 0x0000000725400000,0x0000000725400000,0x0000000725500000:Free Region: 0x0000000725500000,0x0000000725500000,0x0000000725600000:Free Region: 0x0000000725600000,0x0000000725600000,0x0000000725700000:Free Region: 0x0000000725700000,0x0000000725700000,0x0000000725800000:Free ...
20-03-2018

Made modifications to have details of the following form printed for the existing regions. Region: 0x00000005c9400000,0x00000005c9600000,0x00000005c9600000:Old Region: 0x00000005c9600000,0x00000005c9800000,0x00000005c9800000:Old Region: 0x00000005c9800000,0x00000005c9a00000,0x00000005c9a00000:Old Region: 0x00000005c9a00000,0x00000005c9c00000,0x00000005c9c00000:StartsHumongous Region: 0x00000005c9c00000,0x00000005c9e00000,0x00000005c9e00000:ContinuesHumongous Region: 0x00000005c9e00000,0x00000005ca000000,0x00000005ca000000:ContinuesHumongous Region: 0x00000005ca000000,0x00000005ca200000,0x00000005ca200000:ContinuesHumongous Retaining ClhsdbScanOops.java as is, but creating a new test case ClhsdbUniverseScanOopsForG1.java to test for both the 'universe' and 'scanoops' commands for G1GC. Tests for the presence of humongous regions and tests the execution of 'scanoops' though a humongous region. The test currently does not include the testing of the display of Archived or Pinned regions (these will be added to the test once JDK-8174994 is solved).
14-02-2018

Along with the fix for this, the ClhsdbScanOops.java test case needs to be modified to scan the oops from an eden region (once that can be identified using a clhsdb command).
07-12-2017