We need to extend the SA to support G1. Several of our serviceability tools (jmap, jinfo, jstack) depend on the SA and, without these changes, these tools will not work with G1.
The changes that need to be implemented in the SA comprise:
- Introduce the G1CollectedHeap to the CollectedHeap class hierarchy.
- Implement object iteration over the G1 heap. This is relatively straightforward. We'll have to iterate over the HeapRegions in the G1CollectedHeap and, given that HeapRegion extends ContiguousSpace, we'll get the iteration "for free".
- Extend HeapSummary to recognize the G1CollectedHeap and report usage statistics.