32 import java.util.*; |
32 import java.util.*; |
33 |
33 |
34 import sun.jvm.hotspot.debugger.*; |
34 import sun.jvm.hotspot.debugger.*; |
35 import sun.jvm.hotspot.gc.cms.*; |
35 import sun.jvm.hotspot.gc.cms.*; |
36 import sun.jvm.hotspot.gc.shared.*; |
36 import sun.jvm.hotspot.gc.shared.*; |
|
37 import sun.jvm.hotspot.gc.epsilon.*; |
37 import sun.jvm.hotspot.gc.g1.*; |
38 import sun.jvm.hotspot.gc.g1.*; |
38 import sun.jvm.hotspot.gc.parallel.*; |
39 import sun.jvm.hotspot.gc.parallel.*; |
39 import sun.jvm.hotspot.memory.*; |
40 import sun.jvm.hotspot.memory.*; |
40 import sun.jvm.hotspot.runtime.*; |
41 import sun.jvm.hotspot.runtime.*; |
41 import sun.jvm.hotspot.types.*; |
42 import sun.jvm.hotspot.types.*; |
436 PSOldGen oldGen = psh.oldGen(); |
437 PSOldGen oldGen = psh.oldGen(); |
437 addLiveRegions("old ", oldGen.objectSpace().getLiveRegions(), liveRegions); |
438 addLiveRegions("old ", oldGen.objectSpace().getLiveRegions(), liveRegions); |
438 } else if (heap instanceof G1CollectedHeap) { |
439 } else if (heap instanceof G1CollectedHeap) { |
439 G1CollectedHeap g1h = (G1CollectedHeap) heap; |
440 G1CollectedHeap g1h = (G1CollectedHeap) heap; |
440 g1h.heapRegionIterate(lrc); |
441 g1h.heapRegionIterate(lrc); |
|
442 } else if (heap instanceof EpsilonHeap) { |
|
443 EpsilonHeap eh = (EpsilonHeap) heap; |
|
444 liveRegions.add(eh.space().top()); |
|
445 liveRegions.add(eh.space().bottom()); |
441 } else { |
446 } else { |
442 if (Assert.ASSERTS_ENABLED) { |
447 if (Assert.ASSERTS_ENABLED) { |
443 Assert.that(false, "Expecting GenCollectedHeap, G1CollectedHeap, " + |
448 Assert.that(false, "Unexpected CollectedHeap type: " + heap.getClass().getName()); |
444 "or ParallelScavengeHeap, but got " + |
|
445 heap.getClass().getName()); |
|
446 } |
449 } |
447 } |
450 } |
448 |
451 |
449 // If UseTLAB is enabled, snip out regions associated with TLABs' |
452 // If UseTLAB is enabled, snip out regions associated with TLABs' |
450 // dead regions. Note that TLABs can be present in any generation. |
453 // dead regions. Note that TLABs can be present in any generation. |