--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java 2018-07-19 22:49:40.586547681 +0900 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java 2018-07-19 22:49:40.380546290 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import sun.jvm.hotspot.gc.epsilon.*; import sun.jvm.hotspot.gc.g1.*; import sun.jvm.hotspot.gc.parallel.*; +import sun.jvm.hotspot.gc.z.*; import sun.jvm.hotspot.memory.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.types.*; @@ -443,6 +444,14 @@ EpsilonHeap eh = (EpsilonHeap) heap; liveRegions.add(eh.space().top()); liveRegions.add(eh.space().bottom()); + } else if (heap instanceof ZCollectedHeap) { + ZCollectedHeap zh = (ZCollectedHeap) heap; + zh.heap().pageTable().pageTableIterate(p -> { + if (p.refcount() > 0 ) { + liveRegions.add(ZGlobals.ZAddressSpaceStart.addOffsetTo(p.start())); + liveRegions.add(ZGlobals.ZAddressSpaceStart.addOffsetTo(p.top())); + } + }); } else { if (Assert.ASSERTS_ENABLED) { Assert.that(false, "Unexpected CollectedHeap type: " + heap.getClass().getName());