changeset 8637:d47dfabd16d4 jdk9-b67

Merge
author lana
date Thu, 28 May 2015 16:52:47 -0700
parents ac6a7b63d701 eb76189435bb
children 8b4348d24c60 84c51a26d201 cce6baa7f903 5b88604f11a1
files agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java agent/src/share/classes/sun/jvm/hotspot/memory/AdaptiveFreeList.java agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java agent/src/share/classes/sun/jvm/hotspot/memory/CMSCollector.java agent/src/share/classes/sun/jvm/hotspot/memory/CardGeneration.java agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleSpace.java agent/src/share/classes/sun/jvm/hotspot/memory/ConcurrentMarkSweepGeneration.java agent/src/share/classes/sun/jvm/hotspot/memory/ContiguousSpace.java agent/src/share/classes/sun/jvm/hotspot/memory/DefNewGeneration.java agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java agent/src/share/classes/sun/jvm/hotspot/memory/Generation.java agent/src/share/classes/sun/jvm/hotspot/memory/GenerationFactory.java agent/src/share/classes/sun/jvm/hotspot/memory/GenerationIsInClosure.java agent/src/share/classes/sun/jvm/hotspot/memory/GenerationSpec.java agent/src/share/classes/sun/jvm/hotspot/memory/LinearAllocBlock.java agent/src/share/classes/sun/jvm/hotspot/memory/OffsetTableContigSpace.java agent/src/share/classes/sun/jvm/hotspot/memory/ParNewGeneration.java agent/src/share/classes/sun/jvm/hotspot/memory/Space.java agent/src/share/classes/sun/jvm/hotspot/memory/SpaceClosure.java agent/src/share/classes/sun/jvm/hotspot/memory/TenuredGeneration.java agent/src/share/classes/sun/jvm/hotspot/memory/TenuredSpace.java src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.inline.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.cpp src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.hpp src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp src/share/vm/gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp src/share/vm/gc_implementation/g1/bufferingOopClosure.cpp src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp src/share/vm/gc_implementation/g1/collectionSetChooser.cpp src/share/vm/gc_implementation/g1/collectionSetChooser.hpp src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp src/share/vm/gc_implementation/g1/concurrentMark.cpp src/share/vm/gc_implementation/g1/concurrentMark.hpp src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp src/share/vm/gc_implementation/g1/concurrentMarkThread.inline.hpp src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp src/share/vm/gc_implementation/g1/evacuationInfo.hpp src/share/vm/gc_implementation/g1/g1AllocRegion.cpp src/share/vm/gc_implementation/g1/g1AllocRegion.hpp src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp src/share/vm/gc_implementation/g1/g1AllocationContext.hpp src/share/vm/gc_implementation/g1/g1Allocator.cpp src/share/vm/gc_implementation/g1/g1Allocator.hpp src/share/vm/gc_implementation/g1/g1Allocator_ext.cpp src/share/vm/gc_implementation/g1/g1BiasedArray.cpp src/share/vm/gc_implementation/g1/g1BiasedArray.hpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp src/share/vm/gc_implementation/g1/g1CardCounts.cpp src/share/vm/gc_implementation/g1/g1CardCounts.hpp src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp src/share/vm/gc_implementation/g1/g1ErgoVerbose.cpp src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp src/share/vm/gc_implementation/g1/g1EvacFailure.cpp src/share/vm/gc_implementation/g1/g1EvacFailure.hpp src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp src/share/vm/gc_implementation/g1/g1HRPrinter.cpp src/share/vm/gc_implementation/g1/g1HRPrinter.hpp src/share/vm/gc_implementation/g1/g1HotCardCache.cpp src/share/vm/gc_implementation/g1/g1HotCardCache.hpp src/share/vm/gc_implementation/g1/g1InCSetState.hpp src/share/vm/gc_implementation/g1/g1Log.cpp src/share/vm/gc_implementation/g1/g1Log.hpp src/share/vm/gc_implementation/g1/g1MMUTracker.cpp src/share/vm/gc_implementation/g1/g1MMUTracker.hpp src/share/vm/gc_implementation/g1/g1MarkSweep.cpp src/share/vm/gc_implementation/g1/g1MarkSweep.hpp src/share/vm/gc_implementation/g1/g1MarkSweep_ext.cpp src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp src/share/vm/gc_implementation/g1/g1OopClosures.cpp src/share/vm/gc_implementation/g1/g1OopClosures.hpp src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.hpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.hpp src/share/vm/gc_implementation/g1/g1RemSet.cpp src/share/vm/gc_implementation/g1/g1RemSet.hpp src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp src/share/vm/gc_implementation/g1/g1RootProcessor.cpp src/share/vm/gc_implementation/g1/g1RootProcessor.hpp src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp src/share/vm/gc_implementation/g1/g1StringDedup.cpp src/share/vm/gc_implementation/g1/g1StringDedup.hpp src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp src/share/vm/gc_implementation/g1/g1StringDedupQueue.hpp src/share/vm/gc_implementation/g1/g1StringDedupStat.cpp src/share/vm/gc_implementation/g1/g1StringDedupStat.hpp src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp src/share/vm/gc_implementation/g1/g1StringDedupTable.hpp src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp src/share/vm/gc_implementation/g1/g1StringDedupThread.hpp src/share/vm/gc_implementation/g1/g1YCTypes.hpp src/share/vm/gc_implementation/g1/g1_globals.cpp src/share/vm/gc_implementation/g1/g1_globals.hpp src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp src/share/vm/gc_implementation/g1/heapRegion.cpp src/share/vm/gc_implementation/g1/heapRegion.hpp src/share/vm/gc_implementation/g1/heapRegion.inline.hpp src/share/vm/gc_implementation/g1/heapRegionBounds.hpp src/share/vm/gc_implementation/g1/heapRegionBounds.inline.hpp src/share/vm/gc_implementation/g1/heapRegionManager.cpp src/share/vm/gc_implementation/g1/heapRegionManager.hpp src/share/vm/gc_implementation/g1/heapRegionManager.inline.hpp src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp src/share/vm/gc_implementation/g1/heapRegionSet.cpp src/share/vm/gc_implementation/g1/heapRegionSet.hpp src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp src/share/vm/gc_implementation/g1/heapRegionType.cpp src/share/vm/gc_implementation/g1/heapRegionType.hpp src/share/vm/gc_implementation/g1/ptrQueue.cpp src/share/vm/gc_implementation/g1/ptrQueue.hpp src/share/vm/gc_implementation/g1/satbQueue.cpp src/share/vm/gc_implementation/g1/satbQueue.hpp src/share/vm/gc_implementation/g1/sparsePRT.cpp src/share/vm/gc_implementation/g1/sparsePRT.hpp src/share/vm/gc_implementation/g1/survRateGroup.cpp src/share/vm/gc_implementation/g1/survRateGroup.hpp src/share/vm/gc_implementation/g1/vmStructs_g1.hpp src/share/vm/gc_implementation/g1/vm_operations_g1.cpp src/share/vm/gc_implementation/g1/vm_operations_g1.hpp src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp src/share/vm/gc_implementation/parNew/parNewGeneration.cpp src/share/vm/gc_implementation/parNew/parNewGeneration.hpp src/share/vm/gc_implementation/parNew/parOopClosures.cpp src/share/vm/gc_implementation/parNew/parOopClosures.hpp src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp src/share/vm/gc_implementation/parNew/vmStructs_parNew.hpp src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.hpp src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.cpp src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.hpp src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.hpp src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.hpp src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp src/share/vm/gc_implementation/parallelScavenge/generationSizer.cpp src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp src/share/vm/gc_implementation/parallelScavenge/objectStartArray.cpp src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.cpp src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.hpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.cpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp src/share/vm/gc_implementation/parallelScavenge/psYoungGen.hpp src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.hpp src/share/vm/gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp src/share/vm/gc_implementation/shared/ageTable.cpp src/share/vm/gc_implementation/shared/ageTable.hpp src/share/vm/gc_implementation/shared/allocationStats.cpp src/share/vm/gc_implementation/shared/allocationStats.hpp src/share/vm/gc_implementation/shared/cSpaceCounters.cpp src/share/vm/gc_implementation/shared/cSpaceCounters.hpp src/share/vm/gc_implementation/shared/collectorCounters.cpp src/share/vm/gc_implementation/shared/collectorCounters.hpp src/share/vm/gc_implementation/shared/concurrentGCThread.cpp src/share/vm/gc_implementation/shared/concurrentGCThread.hpp src/share/vm/gc_implementation/shared/copyFailedInfo.hpp src/share/vm/gc_implementation/shared/gSpaceCounters.cpp src/share/vm/gc_implementation/shared/gSpaceCounters.hpp src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.cpp src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp src/share/vm/gc_implementation/shared/gcHeapSummary.hpp src/share/vm/gc_implementation/shared/gcId.cpp src/share/vm/gc_implementation/shared/gcId.hpp src/share/vm/gc_implementation/shared/gcPolicyCounters.cpp src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp src/share/vm/gc_implementation/shared/gcStats.cpp src/share/vm/gc_implementation/shared/gcStats.hpp src/share/vm/gc_implementation/shared/gcTimer.cpp src/share/vm/gc_implementation/shared/gcTimer.hpp src/share/vm/gc_implementation/shared/gcTrace.cpp src/share/vm/gc_implementation/shared/gcTrace.hpp src/share/vm/gc_implementation/shared/gcTraceSend.cpp src/share/vm/gc_implementation/shared/gcTraceTime.cpp src/share/vm/gc_implementation/shared/gcTraceTime.hpp src/share/vm/gc_implementation/shared/gcUtil.cpp src/share/vm/gc_implementation/shared/gcUtil.hpp src/share/vm/gc_implementation/shared/gcWhen.hpp src/share/vm/gc_implementation/shared/generationCounters.cpp src/share/vm/gc_implementation/shared/generationCounters.hpp src/share/vm/gc_implementation/shared/hSpaceCounters.cpp src/share/vm/gc_implementation/shared/hSpaceCounters.hpp src/share/vm/gc_implementation/shared/immutableSpace.cpp src/share/vm/gc_implementation/shared/immutableSpace.hpp src/share/vm/gc_implementation/shared/isGCActiveMark.hpp src/share/vm/gc_implementation/shared/liveRange.hpp src/share/vm/gc_implementation/shared/markSweep.cpp src/share/vm/gc_implementation/shared/markSweep.hpp src/share/vm/gc_implementation/shared/markSweep.inline.hpp src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp src/share/vm/gc_implementation/shared/mutableNUMASpace.hpp src/share/vm/gc_implementation/shared/mutableSpace.cpp src/share/vm/gc_implementation/shared/mutableSpace.hpp src/share/vm/gc_implementation/shared/objectCountEventSender.cpp src/share/vm/gc_implementation/shared/objectCountEventSender.hpp src/share/vm/gc_implementation/shared/plab.cpp src/share/vm/gc_implementation/shared/plab.hpp src/share/vm/gc_implementation/shared/plab.inline.hpp src/share/vm/gc_implementation/shared/spaceCounters.cpp src/share/vm/gc_implementation/shared/spaceCounters.hpp src/share/vm/gc_implementation/shared/spaceDecorator.cpp src/share/vm/gc_implementation/shared/spaceDecorator.hpp src/share/vm/gc_implementation/shared/suspendibleThreadSet.cpp src/share/vm/gc_implementation/shared/suspendibleThreadSet.hpp src/share/vm/gc_implementation/shared/vmGCOperations.cpp src/share/vm/gc_implementation/shared/vmGCOperations.hpp src/share/vm/gc_interface/allocTracer.cpp src/share/vm/gc_interface/allocTracer.hpp src/share/vm/gc_interface/collectedHeap.cpp src/share/vm/gc_interface/collectedHeap.hpp src/share/vm/gc_interface/collectedHeap.inline.hpp src/share/vm/gc_interface/gcCause.cpp src/share/vm/gc_interface/gcCause.hpp src/share/vm/gc_interface/gcName.hpp src/share/vm/memory/barrierSet.cpp src/share/vm/memory/barrierSet.hpp src/share/vm/memory/barrierSet.inline.hpp src/share/vm/memory/blockOffsetTable.cpp src/share/vm/memory/blockOffsetTable.hpp src/share/vm/memory/blockOffsetTable.inline.hpp src/share/vm/memory/cardGeneration.cpp src/share/vm/memory/cardGeneration.hpp src/share/vm/memory/cardGeneration.inline.hpp src/share/vm/memory/cardTableModRefBS.cpp src/share/vm/memory/cardTableModRefBS.hpp src/share/vm/memory/cardTableModRefBS.inline.hpp src/share/vm/memory/cardTableRS.cpp src/share/vm/memory/cardTableRS.hpp src/share/vm/memory/collectorPolicy.cpp src/share/vm/memory/collectorPolicy.hpp src/share/vm/memory/defNewGeneration.cpp src/share/vm/memory/defNewGeneration.hpp src/share/vm/memory/defNewGeneration.inline.hpp src/share/vm/memory/gcLocker.cpp src/share/vm/memory/gcLocker.hpp src/share/vm/memory/gcLocker.inline.hpp src/share/vm/memory/genCollectedHeap.cpp src/share/vm/memory/genCollectedHeap.hpp src/share/vm/memory/genMarkSweep.cpp src/share/vm/memory/genMarkSweep.hpp src/share/vm/memory/genOopClosures.cpp src/share/vm/memory/genOopClosures.hpp src/share/vm/memory/genOopClosures.inline.hpp src/share/vm/memory/genRemSet.cpp src/share/vm/memory/genRemSet.hpp src/share/vm/memory/genRemSet.inline.hpp src/share/vm/memory/generation.cpp src/share/vm/memory/generation.hpp src/share/vm/memory/generationSpec.cpp src/share/vm/memory/generationSpec.hpp src/share/vm/memory/modRefBarrierSet.hpp src/share/vm/memory/referencePolicy.cpp src/share/vm/memory/referencePolicy.hpp src/share/vm/memory/referenceProcessor.cpp src/share/vm/memory/referenceProcessor.hpp src/share/vm/memory/referenceProcessorStats.hpp src/share/vm/memory/space.cpp src/share/vm/memory/space.hpp src/share/vm/memory/space.inline.hpp src/share/vm/memory/specialized_oop_closures.hpp src/share/vm/memory/strongRootsScope.cpp src/share/vm/memory/strongRootsScope.hpp src/share/vm/memory/tenuredGeneration.cpp src/share/vm/memory/tenuredGeneration.hpp src/share/vm/memory/tenuredGeneration.inline.hpp src/share/vm/memory/threadLocalAllocBuffer.cpp src/share/vm/memory/threadLocalAllocBuffer.hpp src/share/vm/memory/threadLocalAllocBuffer.inline.hpp src/share/vm/memory/watermark.hpp src/share/vm/utilities/taskqueue.cpp src/share/vm/utilities/taskqueue.hpp src/share/vm/utilities/taskqueue.inline.hpp src/share/vm/utilities/workgroup.cpp src/share/vm/utilities/workgroup.hpp src/share/vm/utilities/yieldingWorkgroup.cpp src/share/vm/utilities/yieldingWorkgroup.hpp test/gc/concurrentMarkSweep/DisableResizePLAB.java test/gc/concurrentMarkSweep/GuardShrinkWarning.java test/gc/defnew/HeapChangeLogging.java test/gc/parallelScavenge/AdaptiveGCBoundary.java test/gc/parallelScavenge/TestDynShrinkHeap.java
diffstat 951 files changed, 122345 insertions(+), 121833 deletions(-) [+]
line wrap: on
line diff
--- a/agent/make/Makefile	Thu May 28 16:13:49 2015 -0700
+++ b/agent/make/Makefile	Thu May 28 16:52:47 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2015, 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
@@ -79,11 +79,10 @@
 sun.jvm.hotspot.debugger.windbg.amd64 \
 sun.jvm.hotspot.debugger.windbg.x86 \
 sun.jvm.hotspot.debugger.x86 \
-sun.jvm.hotspot.gc_implementation \
-sun.jvm.hotspot.gc_implementation.g1 \
-sun.jvm.hotspot.gc_implementation.parallelScavenge \
-sun.jvm.hotspot.gc_implementation.shared \
-sun.jvm.hotspot.gc_interface \
+sun.jvm.hotspot.gc \
+sun.jvm.hotspot.gc.g1 \
+sun.jvm.hotspot.gc.parallel \
+sun.jvm.hotspot.gc.shared \
 sun.jvm.hotspot.interpreter \
 sun.jvm.hotspot.jdi \
 sun.jvm.hotspot.memory \
@@ -168,9 +167,9 @@
 sun/jvm/hotspot/debugger/windbg/*.java \
 sun/jvm/hotspot/debugger/windbg/x86/*.java \
 sun/jvm/hotspot/debugger/x86/*.java \
-sun/jvm/hotspot/gc_implementation/g1/*.java \
-sun/jvm/hotspot/gc_implementation/parallelScavenge/*.java \
-sun/jvm/hotspot/gc_implementation/shared/*.java \
+sun/jvm/hotspot/gc/g1/*.java \
+sun/jvm/hotspot/gc/parallel/*.java \
+sun/jvm/hotspot/gc/shared/*.java \
 sun/jvm/hotspot/interpreter/*.java \
 sun/jvm/hotspot/jdi/*.java \
 sun/jvm/hotspot/memory/*.java \
--- a/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Thu May 28 16:13:49 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Thu May 28 16:52:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -33,8 +33,8 @@
 import sun.jvm.hotspot.code.*;
 import sun.jvm.hotspot.compiler.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.parallel.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.interpreter.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
@@ -927,7 +927,7 @@
             if (curVFrame.isCompiledFrame()) {
               CodeBlob cb = VM.getVM().getCodeCache().findBlob(curFrame.getPC());
               ImmutableOopMapSet maps = cb.getOopMaps();
-              if ((maps == null) || (maps.getSize() == 0)) {
+              if ((maps == null) || (maps.getCount() == 0)) {
                 shouldSkipOopMaps = true;
               }
             }
--- a/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapPair.java	Thu May 28 16:13:49 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapPair.java	Thu May 28 16:52:47 2015 -0700
@@ -71,4 +71,8 @@
     offsetField = type.getCIntegerField("_oopmap_offset");
     classSize = type.getSize();
   }
+
+  public String toString() {
+    return "Pair{pc_offset = " + getPC() + ", data_offset = " + getOffset() + "}";
+  }
 }
--- a/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapSet.java	Thu May 28 16:13:49 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapSet.java	Thu May 28 16:52:47 2015 -0700
@@ -106,19 +106,19 @@
   /**
    * Returns the number of OopMaps in this ImmutableOopMapSet
    */
-  public long getSize() {
-    return countField.getValue(addr);
-  }
-
   public int getCount() { return (int) countField.getValue(addr); }
 
   private Address dataStart() {
-    return (addr.addOffsetTo(ImmutableOopMapSet.classSize * getCount()));
+    return (pairStart().addOffsetTo(ImmutableOopMapPair.classSize() * getCount()));
+  }
+
+  private Address pairStart() {
+    return addr.addOffsetTo(ImmutableOopMapSet.classSize);
   }
 
   public ImmutableOopMapPair pairAt(int index) {
     Assert.that((index >= 0) && (index < getCount()), "bad index");
-    return new ImmutableOopMapPair(addr.addOffsetTo(index * ImmutableOopMapPair.classSize()));
+    return new ImmutableOopMapPair(pairStart().addOffsetTo(index * ImmutableOopMapPair.classSize()));
   }
 
   /**
@@ -126,7 +126,7 @@
    */
   public ImmutableOopMap getMapAt(int index) {
     if (Assert.ASSERTS_ENABLED) {
-      Assert.that((index >= 0) && (index <= getSize()), "bad index");
+      Assert.that((index >= 0) && (index <= getCount()), "bad index");
     }
 
     ImmutableOopMapPair immutableOopMapPair = pairAt(index);
@@ -135,7 +135,7 @@
 
   public ImmutableOopMap findMapAtOffset(long pcOffset, boolean debugging) {
     int i;
-    int len = (int) getSize();
+    int len = getCount();
     if (Assert.ASSERTS_ENABLED) {
       Assert.that(len > 0, "must have pointer maps");
     }
@@ -253,14 +253,14 @@
     if (!VM.getVM().isDebugging()) {
       if (Assert.ASSERTS_ENABLED) {
         ImmutableOopMapSet maps = cb.getOopMaps();
-        Assert.that((maps != null) && (maps.getSize() > 0), "found null or empty ImmutableOopMapSet for CodeBlob");
+        Assert.that((maps != null) && (maps.getCount() > 0), "found null or empty ImmutableOopMapSet for CodeBlob");
       }
     } else {
       // Hack for some topmost frames that have been found with empty
       // OopMapSets. (Actually have not seen the null case, but don't
       // want to take any chances.) See HSDB.showThreadStackMemory().
       ImmutableOopMapSet maps = cb.getOopMaps();
-      if ((maps == null) || (maps.getSize() == 0)) {
+      if ((maps == null) || (maps.getCount() == 0)) {
         return;
       }
     }
@@ -311,8 +311,28 @@
     return pairAt(index);
   }
 
+  private int getSize() {
+    return (int) sizeField.getValue(addr);
+  }
+
   public ImmutableOopMap getMap(ImmutableOopMapPair pair) {
-    Assert.that(pair.getOffset() < (int) sizeField.getValue(), "boundary check");
+    Assert.that(pair.getOffset() < getSize(), "boundary check: this: " + this + " offset: " + pair);
     return new ImmutableOopMap(dataStart().addOffsetTo(pair.getOffset()));
   }
+
+  public String toString() {
+    StringBuilder builder = new StringBuilder();
+    builder.append("Set{ ")
+      .append("addr = ").append(addr)
+      .append(", count = ").append(getCount())
+      .append(", size = ").append(getSize())
+      .append(", pairs = [");
+
+    for (int i = 0; i < getCount(); ++i) {
+      builder.append(getPairAt(i));
+    }
+
+    builder.append("]");
+    return builder.toString();
+  }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/AdaptiveFreeList.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,77 @@
+/*
+ * @(#)AdaptiveFreeList.java
+ *
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+public class AdaptiveFreeList extends VMObject {
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+      public void update(Observable o, Object data) {
+        initialize(VM.getVM().getTypeDataBase());
+      }
+    });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("AdaptiveFreeList<FreeChunk>");
+    sizeField = type.getCIntegerField("_size");
+    countField = type.getCIntegerField("_count");
+    headerSize = type.getSize();
+  }
+
+  // Fields
+  private static CIntegerField sizeField;
+  private static CIntegerField countField;
+  private static long          headerSize;
+
+  //Constructor
+  public AdaptiveFreeList(Address address) {
+    super(address);
+  }
+
+  // Accessors
+  public long size() {
+    return sizeField.getValue(addr);
+  }
+
+  public long count() {
+    return  countField.getValue(addr);
+  }
+
+  public static long sizeOf() {
+    return headerSize;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CMSBitMap.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2007, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class CMSBitMap extends VMObject {
+  private static AddressField bmStartWordField;
+  private static CIntegerField bmWordSizeField;
+  private static CIntegerField shifterField;
+  //private static AddressField bmField;
+  private static long virtualSpaceFieldOffset;
+
+  public CMSBitMap(Address addr) {
+    super(addr);
+  }
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("CMSBitMap");
+    bmStartWordField = type.getAddressField("_bmStartWord");
+    bmWordSizeField = type.getCIntegerField("_bmWordSize");
+    shifterField = type.getCIntegerField("_shifter");
+    //bmField = type.getAddressField("_bm");
+    virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset();
+  }
+  public void printAll() {
+    System.out.println("bmStartWord(): "+bmStartWord());
+    System.out.println("bmWordSize(): "+bmWordSize());
+    System.out.println("shifter(): "+shifter());
+  }
+
+  public Address bmStartWord() {
+    return bmStartWordField.getValue(addr);
+  }
+  public long bmWordSize() {
+    return bmWordSizeField.getValue(addr);
+  }
+  public long shifter() {
+    return shifterField.getValue(addr);
+  }
+  public VirtualSpace virtualSpace() {
+    return (VirtualSpace) VMObjectFactory.newObject(VirtualSpace.class, addr.addOffsetTo(virtualSpaceFieldOffset));
+  }
+
+  public BitMap bm() {
+    BitMap bitMap = new BitMap((int) (bmWordSize() >> shifter() ));
+    VirtualSpace vs = virtualSpace();
+    bitMap.set_map(vs.low());
+    return bitMap;
+  }
+
+  public Address getNextMarkedWordAddress(Address addr) {
+    Address endWord = bmStartWord().addOffsetTo(bmWordSize());
+    int nextOffset = bm().getNextOneOffset(heapWordToOffset(addr), heapWordToOffset(endWord) );
+    Address nextAddr = offsetToHeapWord(nextOffset);
+    return nextAddr;
+  }
+
+  int heapWordToOffset(Address addr) {
+    int temp = (int)addr.minus(bmStartWord()) / (int) VM.getVM().getAddressSize();
+    int ret_val = temp >> shifter();
+    return ret_val;
+  }
+
+  Address offsetToHeapWord(int offset) {
+    int temp = offset << shifter();
+    return bmStartWord().addOffsetTo(temp*VM.getVM().getAddressSize());
+  }
+
+  boolean isMarked(Address addr) {
+    BitMap bm = bm();
+    return bm.at(heapWordToOffset(addr));
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CMSCollector.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2007, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class CMSCollector extends VMObject {
+  private static long markBitMapFieldOffset;
+
+  public CMSCollector(Address addr) {
+    super(addr);
+  }
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("CMSCollector");
+    markBitMapFieldOffset = type.getField("_markBitMap").getOffset();
+  }
+
+  //Accessing mark bitmap
+  public CMSBitMap markBitMap() {
+   return (CMSBitMap) VMObjectFactory.newObject(
+                                CMSBitMap.class,
+                                addr.addOffsetTo(markBitMapFieldOffset));
+  }
+
+  public long blockSizeUsingPrintezisBits(Address addr) {
+    CMSBitMap markBitMap = markBitMap();
+    long addressSize = VM.getVM().getAddressSize();
+    if ( markBitMap.isMarked(addr) &&  markBitMap.isMarked(addr.addOffsetTo(1*addressSize)) ) {
+      Address nextOneAddr = markBitMap.getNextMarkedWordAddress(addr.addOffsetTo(2*addressSize));
+      //return size in bytes
+      long size =  (nextOneAddr.addOffsetTo(1*addressSize)).minus(addr);
+      return size;
+    } else {
+      //missing Printezis marks
+      return -1;
+    }
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.oops.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class CompactibleFreeListSpace extends CompactibleSpace {
+   private static AddressField collectorField;
+   private static AddressField indexedFreeListField;
+   private static AddressField dictionaryField;
+   private static long         smallLinearAllocBlockFieldOffset;
+
+   private int    heapWordSize;     // 4 for 32bit, 8 for 64 bits
+   private int    IndexSetStart;    // for small indexed list
+   private int    IndexSetSize;
+   private int    IndexSetStride;
+
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      long sizeofFreeChunk = db.lookupType("FreeChunk").getSize();
+      VM vm = VM.getVM();
+      MinChunkSizeInBytes = numQuanta(sizeofFreeChunk, vm.getMinObjAlignmentInBytes()) *
+                     vm.getMinObjAlignmentInBytes();
+
+     Type type = db.lookupType("CompactibleFreeListSpace");
+     collectorField = type.getAddressField("_collector");
+     collectorField       = type.getAddressField("_collector");
+     dictionaryField      = type.getAddressField("_dictionary");
+     indexedFreeListField = type.getAddressField("_indexedFreeList[0]");
+     smallLinearAllocBlockFieldOffset = type.getField("_smallLinearAllocBlock").getOffset();
+   }
+
+   public CompactibleFreeListSpace(Address addr) {
+      super(addr);
+      VM vm = VM.getVM();
+      heapWordSize   = vm.getHeapWordSize();
+      IndexSetStart  = vm.getMinObjAlignmentInBytes() / heapWordSize;
+      IndexSetStride = IndexSetStart;
+      IndexSetSize   = 257;
+   }
+
+   // Accessing block offset table
+   public CMSCollector collector() {
+    return (CMSCollector) VMObjectFactory.newObject(
+                                 CMSCollector.class,
+                                 collectorField.getValue(addr));
+   }
+
+   public long free0() {
+     return capacity() - used0();
+   }
+
+   public long used() {
+     return capacity() - free();
+   }
+
+   public long used0() {
+      List regions = getLiveRegions();
+      long usedSize = 0L;
+      for (Iterator itr = regions.iterator(); itr.hasNext();) {
+         MemRegion mr = (MemRegion) itr.next();
+         usedSize += mr.byteSize();
+      }
+      return usedSize;
+   }
+
+   public long free() {
+      // small chunks
+      long size = 0;
+      Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() );
+      cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf());
+      for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) {
+         AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur);
+         size += i*freeList.count();
+         cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf());
+      }
+
+      // large block
+      AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class,
+                                                                                   dictionaryField.getValue(addr));
+      size += aflbd.size();
+
+
+      // linear block in TLAB
+      LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class,
+                                                                          addr.addOffsetTo(smallLinearAllocBlockFieldOffset));
+      size += lab.word_size();
+
+      return size*heapWordSize;
+  }
+
+   public void printOn(PrintStream tty) {
+      tty.print("free-list-space");
+      tty.print("[ " + bottom() + " , " + end() + " ) ");
+      long cap = capacity();
+      long used_size = used();
+      long free_size = free();
+      int  used_perc = (int)((double)used_size/cap*100);
+      tty.print("space capacity = " + cap + " used(" + used_perc + "%)= " + used_size + " ");
+      tty.print("free= " + free_size );
+      tty.print("\n");
+
+   }
+
+   public Address skipBlockSizeUsingPrintezisBits(Address pos) {
+       CMSCollector collector = collector();
+       long size = 0;
+       Address addr = null;
+
+       if (collector != null) {
+         size = collector.blockSizeUsingPrintezisBits(pos);
+         if (size >= 3) {
+           addr = pos.addOffsetTo(adjustObjectSizeInBytes(size));
+         }
+       }
+       return addr;
+   }
+
+   public List/*<MemRegion>*/ getLiveRegions() {
+      List res = new ArrayList(); // List<MemRegion>
+      VM vm = VM.getVM();
+      Debugger dbg = vm.getDebugger();
+      ObjectHeap heap = vm.getObjectHeap();
+      Address cur = bottom();
+      Address regionStart = cur;
+      Address limit = end();
+      final long addressSize = vm.getAddressSize();
+
+      for (; cur.lessThan(limit);) {
+         Address k = cur.getAddressAt(addressSize);
+         if (FreeChunk.indicatesFreeChunk(cur)) {
+            if (! cur.equals(regionStart)) {
+               res.add(new MemRegion(regionStart, cur));
+            }
+            FreeChunk fc = (FreeChunk) VMObjectFactory.newObject(FreeChunk.class, cur);
+            long chunkSize = fc.size();
+            if (Assert.ASSERTS_ENABLED) {
+               Assert.that(chunkSize > 0, "invalid FreeChunk size");
+            }
+            // note that fc.size() gives chunk size in heap words
+            cur = cur.addOffsetTo(chunkSize * addressSize);
+            regionStart = cur;
+         } else if (k != null) {
+            Oop obj = heap.newOop(cur.addOffsetToAsOopHandle(0));
+            long objectSize = obj.getObjectSize();
+            cur = cur.addOffsetTo(adjustObjectSizeInBytes(objectSize));
+         } else {
+            // FIXME: need to do a better job here.
+            // can I use bitMap here?
+            //Find the object size using Printezis bits and skip over
+            long size = collector().blockSizeUsingPrintezisBits(cur);
+            if (size == -1) {
+              break;
+            }
+            cur = cur.addOffsetTo(adjustObjectSizeInBytes(size));
+         }
+      }
+      return res;
+   }
+
+   //-- Internals only below this point
+
+   // Unlike corresponding VM code, we operate on byte size rather than
+   // HeapWord size for convenience.
+
+   private static long numQuanta(long x, long y) {
+      return  ((x+y-1)/y);
+   }
+
+   public static long adjustObjectSizeInBytes(long sizeInBytes) {
+      return Oop.alignObjectSize(Math.max(sizeInBytes, MinChunkSizeInBytes));
+   }
+
+   // FIXME: should I read this directly from VM?
+   private static long MinChunkSizeInBytes;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/ConcurrentMarkSweepGeneration.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class ConcurrentMarkSweepGeneration extends CardGeneration {
+  private static AddressField cmsSpaceField;
+
+  public ConcurrentMarkSweepGeneration(Address addr) {
+    super(addr);
+  }
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("ConcurrentMarkSweepGeneration");
+    cmsSpaceField = type.getAddressField("_cmsSpace");
+  }
+
+  // Accessing space
+  public CompactibleFreeListSpace cmsSpace() {
+    return (CompactibleFreeListSpace) VMObjectFactory.newObject(
+                                 CompactibleFreeListSpace.class,
+                                 cmsSpaceField.getValue(addr));
+  }
+
+  public long capacity()                { return cmsSpace().capacity(); }
+  public long used()                    { return cmsSpace().used(); }
+  public long free()                    { return cmsSpace().free(); }
+  public long contiguousAvailable()     { throw new RuntimeException("not yet implemented"); }
+  public boolean contains(Address p)    { return cmsSpace().contains(p); }
+  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
+     blk.doSpace(cmsSpace());
+  }
+
+  public Generation.Name kind() {
+    return Generation.Name.CONCURRENT_MARK_SWEEP;
+  }
+
+  public String name() {
+    return "concurrent mark-sweep generation";
+  }
+
+  public void printOn(PrintStream tty) {
+    tty.println(name());
+    cmsSpace().printOn(tty);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/LinearAllocBlock.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,59 @@
+/*
+ * @(#)BinaryTreeDictionary.java
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.runtime.*;
+
+public class LinearAllocBlock extends VMObject {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("LinearAllocBlock");
+      word_sizeField= type.getCIntegerField("_word_size");
+   }
+
+   // Fields
+   private static CIntegerField word_sizeField;
+
+   // Accessors
+   public long word_size() {
+      return word_sizeField.getValue(addr);
+   }
+
+   // Constructor
+   public LinearAllocBlock(Address addr) {
+      super(addr);
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/cms/ParNewGeneration.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.cms;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.serial.*;
+import sun.jvm.hotspot.gc.shared.*;
+
+public class ParNewGeneration extends DefNewGeneration {
+  public ParNewGeneration(Address addr) {
+    super(addr);
+  }
+
+  public Generation.Name kind() {
+    return Generation.Name.PAR_NEW;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,40 @@
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+public class G1Allocator extends VMObject {
+
+  //size_t _summary_bytes_used;
+  static private CIntegerField summaryBytesUsedField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+      public void update(Observable o, Object data) {
+        initialize(VM.getVM().getTypeDataBase());
+      }
+    });
+  }
+
+  static private synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("G1Allocator");
+
+    summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
+  }
+
+  public long getSummaryBytes() {
+    return summaryBytesUsedField.getValue(addr);
+  }
+
+  public G1Allocator(Address addr) {
+    super(addr);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2011, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.gc.shared.CollectedHeap;
+import sun.jvm.hotspot.gc.shared.CollectedHeapName;
+import sun.jvm.hotspot.gc.shared.SpaceClosure;
+import sun.jvm.hotspot.memory.MemRegion;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for G1CollectedHeap.
+
+public class G1CollectedHeap extends CollectedHeap {
+    // HeapRegionManager _hrm;
+    static private long hrmFieldOffset;
+    // MemRegion _g1_reserved;
+    static private long g1ReservedFieldOffset;
+    // G1Allocator* _allocator
+    static private AddressField g1Allocator;
+    // G1MonitoringSupport* _g1mm;
+    static private AddressField g1mmField;
+    // HeapRegionSet _old_set;
+    static private long oldSetFieldOffset;
+    // HeapRegionSet _humongous_set;
+    static private long humongousSetFieldOffset;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("G1CollectedHeap");
+
+        hrmFieldOffset = type.getField("_hrm").getOffset();
+        g1Allocator = type.getAddressField("_allocator");
+        g1mmField = type.getAddressField("_g1mm");
+        oldSetFieldOffset = type.getField("_old_set").getOffset();
+        humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
+    }
+
+    public long capacity() {
+        return hrm().capacity();
+    }
+
+    public long used() {
+        return allocator().getSummaryBytes();
+    }
+
+    public long n_regions() {
+        return hrm().length();
+    }
+
+    private HeapRegionManager hrm() {
+        Address hrmAddr = addr.addOffsetTo(hrmFieldOffset);
+        return (HeapRegionManager) VMObjectFactory.newObject(HeapRegionManager.class,
+                                                         hrmAddr);
+    }
+
+    public G1MonitoringSupport g1mm() {
+        Address g1mmAddr = g1mmField.getValue(addr);
+        return (G1MonitoringSupport) VMObjectFactory.newObject(G1MonitoringSupport.class, g1mmAddr);
+    }
+
+    public G1Allocator allocator() {
+        Address g1AllocatorAddr = g1Allocator.getValue(addr);
+        return (G1Allocator) VMObjectFactory.newObject(G1Allocator.class, g1AllocatorAddr);
+    }
+
+    public HeapRegionSetBase oldSet() {
+        Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset);
+        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
+                                                             oldSetAddr);
+    }
+
+    public HeapRegionSetBase humongousSet() {
+        Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset);
+        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
+                                                             humongousSetAddr);
+    }
+
+    private Iterator<HeapRegion> heapRegionIterator() {
+        return hrm().heapRegionIterator();
+    }
+
+    public void heapRegionIterate(SpaceClosure scl) {
+        Iterator<HeapRegion> iter = heapRegionIterator();
+        while (iter.hasNext()) {
+            HeapRegion hr = iter.next();
+            scl.doSpace(hr);
+        }
+    }
+
+    public CollectedHeapName kind() {
+        return CollectedHeapName.G1_COLLECTED_HEAP;
+    }
+
+    public G1CollectedHeap(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2013, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for G1HeapRegionTable. It's essentially an index -> HeapRegion map.
+
+public class G1HeapRegionTable extends VMObject {
+    // HeapRegion** _base;
+    static private AddressField baseField;
+    // uint _length;
+    static private CIntegerField lengthField;
+    // HeapRegion** _biased_base
+    static private AddressField biasedBaseField;
+    // size_t _bias
+    static private CIntegerField biasField;
+    // uint _shift_by
+    static private CIntegerField shiftByField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("G1HeapRegionTable");
+
+        baseField = type.getAddressField("_base");
+        lengthField = type.getCIntegerField("_length");
+        biasedBaseField = type.getAddressField("_biased_base");
+        biasField = type.getCIntegerField("_bias");
+        shiftByField = type.getCIntegerField("_shift_by");
+    }
+
+    private HeapRegion at(long index) {
+        Address arrayAddr = baseField.getValue(addr);
+        // Offset of &_base[index]
+        long offset = index * VM.getVM().getAddressSize();
+        Address regionAddr = arrayAddr.getAddressAt(offset);
+        return (HeapRegion) VMObjectFactory.newObject(HeapRegion.class,
+                                                      regionAddr);
+    }
+
+    public long length() {
+        return lengthField.getValue(addr);
+    }
+
+    public long bias() {
+        return biasField.getValue(addr);
+    }
+
+    public long shiftBy() {
+        return shiftByField.getValue(addr);
+    }
+
+    private class HeapRegionIterator implements Iterator<HeapRegion> {
+        private long index;
+        private long length;
+        private HeapRegion next;
+
+        public HeapRegion positionToNext() {
+          HeapRegion result = next;
+          while (index < length && at(index) == null) {
+            index++;
+          }
+          if (index < length) {
+            next = at(index);
+            index++; // restart search at next element
+          } else {
+            next = null;
+          }
+          return result;
+        }
+
+        @Override
+        public boolean hasNext() { return next != null;     }
+
+        @Override
+        public HeapRegion next() { return positionToNext(); }
+
+        @Override
+        public void remove()     { /* not supported */      }
+
+        HeapRegionIterator(long totalLength) {
+            index = 0;
+            length = totalLength;
+            positionToNext();
+        }
+    }
+
+    public Iterator<HeapRegion> heapRegionIterator(long committedLength) {
+        return new HeapRegionIterator(committedLength);
+    }
+
+    public G1HeapRegionTable(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1MonitoringSupport.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2011, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for G1MonitoringSupport.
+
+public class G1MonitoringSupport extends VMObject {
+    // size_t _eden_committed;
+    static private CIntegerField edenCommittedField;
+    // size_t _eden_used;
+    static private CIntegerField edenUsedField;
+    // size_t _survivor_committed;
+    static private CIntegerField survivorCommittedField;
+    // size_t _survivor_used;
+    static private CIntegerField survivorUsedField;
+    // size_t _old_committed;
+    static private CIntegerField oldCommittedField;
+    // size_t _old_used;
+    static private CIntegerField oldUsedField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("G1MonitoringSupport");
+
+        edenCommittedField = type.getCIntegerField("_eden_committed");
+        edenUsedField = type.getCIntegerField("_eden_used");
+        survivorCommittedField = type.getCIntegerField("_survivor_committed");
+        survivorUsedField = type.getCIntegerField("_survivor_used");
+        oldCommittedField = type.getCIntegerField("_old_committed");
+        oldUsedField = type.getCIntegerField("_old_used");
+    }
+
+    public long edenCommitted() {
+        return edenCommittedField.getValue(addr);
+    }
+
+    public long edenUsed() {
+        return edenUsedField.getValue(addr);
+    }
+
+    public long edenRegionNum() {
+        return edenUsed() / HeapRegion.grainBytes();
+    }
+
+    public long survivorCommitted() {
+        return survivorCommittedField.getValue(addr);
+    }
+
+    public long survivorUsed() {
+        return survivorUsedField.getValue(addr);
+    }
+
+    public long survivorRegionNum() {
+        return survivorUsed() / HeapRegion.grainBytes();
+    }
+
+    public long oldCommitted() {
+        return oldCommittedField.getValue(addr);
+    }
+
+    public long oldUsed() {
+        return oldUsedField.getValue(addr);
+    }
+
+    public G1MonitoringSupport(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Observable;
+import java.util.Observer;
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.gc.shared.CompactibleSpace;
+import sun.jvm.hotspot.memory.MemRegion;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for HeapRegion. Currently we don't actually include
+// any of its fields but only iterate over it.
+
+public class HeapRegion extends CompactibleSpace {
+    // static int GrainBytes;
+    static private CIntegerField grainBytesField;
+    static private AddressField topField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("HeapRegion");
+
+        grainBytesField = type.getCIntegerField("GrainBytes");
+        topField = type.getAddressField("_top");
+
+    }
+
+    static public long grainBytes() {
+        return grainBytesField.getValue();
+    }
+
+    public HeapRegion(Address addr) {
+        super(addr);
+    }
+
+    public Address top() {
+        return topField.getValue(addr);
+    }
+
+    @Override
+    public List getLiveRegions() {
+        List res = new ArrayList();
+        res.add(new MemRegion(bottom(), top()));
+        return res;
+    }
+
+    @Override
+    public long used() {
+        return top().minus(bottom());
+    }
+
+    @Override
+    public long free() {
+        return end().minus(top());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2011, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for HeapRegionManager.
+
+public class HeapRegionManager extends VMObject {
+    // G1HeapRegionTable _regions
+    static private long regionsFieldOffset;
+    // uint _committed_length
+    static private CIntegerField numCommittedField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("HeapRegionManager");
+
+        regionsFieldOffset = type.getField("_regions").getOffset();
+        numCommittedField = type.getCIntegerField("_num_committed");
+    }
+
+    private G1HeapRegionTable regions() {
+        Address regionsAddr = addr.addOffsetTo(regionsFieldOffset);
+        return (G1HeapRegionTable) VMObjectFactory.newObject(G1HeapRegionTable.class,
+                                                             regionsAddr);
+    }
+
+    public long capacity() {
+        return length() * HeapRegion.grainBytes();
+    }
+
+    public long length() {
+        return regions().length();
+    }
+
+    public long committedLength() {
+        return numCommittedField.getValue(addr);
+    }
+
+    public Iterator<HeapRegion> heapRegionIterator() {
+        return regions().heapRegionIterator(length());
+    }
+
+    public HeapRegionManager(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2012, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for HeapRegionSetBase. Represents a group of regions.
+
+public class HeapRegionSetBase extends VMObject {
+
+    static private long countField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("HeapRegionSetBase");
+
+        countField = type.getField("_count").getOffset();
+    }
+
+
+    public HeapRegionSetCount count() {
+        Address countFieldAddr = addr.addOffsetTo(countField);
+        return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr);
+    }
+
+    public HeapRegionSetBase(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetCount.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.g1;
+
+import java.util.Iterator;
+import java.util.Observable;
+import java.util.Observer;
+
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for HeapRegionSetCount. Represents a group of regions.
+
+public class HeapRegionSetCount extends VMObject {
+
+    static private CIntegerField lengthField;
+    static private CIntegerField capacityField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("HeapRegionSetCount");
+
+        lengthField   = type.getCIntegerField("_length");
+        capacityField = type.getCIntegerField("_capacity");
+    }
+
+    public long length() {
+        return lengthField.getValue(addr);
+    }
+
+    public long capacity() {
+        return capacityField.getValue(addr);
+    }
+
+    public HeapRegionSetCount(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ImmutableSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.parallel;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public abstract class ImmutableSpace extends VMObject {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("ImmutableSpace");
+      bottomField = type.getAddressField("_bottom");
+      endField    = type.getAddressField("_end");
+   }
+
+   public ImmutableSpace(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField bottomField;
+   private static AddressField endField;
+
+   // Accessors
+   public Address   bottom()       { return bottomField.getValue(addr); }
+   public Address   end()          { return endField.getValue(addr);    }
+
+   /** Returns a subregion of the space containing all the objects in
+      the space. */
+   public MemRegion usedRegion() {
+      return new MemRegion(bottom(), end());
+   }
+
+   /** Support for iteration over heap -- not sure how this will
+      interact with GC in reflective system, but necessary for the
+      debugging mechanism */
+   public OopHandle bottomAsOopHandle() {
+      return bottomField.getOopHandle(addr);
+   }
+
+   /** returns all MemRegions where live objects are */
+   public abstract List/*<MemRegion>*/ getLiveRegions();
+
+   /** Returned value is in bytes */
+   public long capacity() { return end().minus(bottom()); }
+
+   public abstract long used();
+
+   /** Testers */
+   public boolean contains(Address p) {
+      return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
+   }
+
+   public void print() { printOn(System.out); }
+   public abstract void printOn(PrintStream tty);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/MutableSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.parallel;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class MutableSpace extends ImmutableSpace {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("MutableSpace");
+      topField    = type.getAddressField("_top");
+   }
+
+   public MutableSpace(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField topField;
+
+   // Accessors
+   public Address   top()          { return topField.getValue(addr);    }
+
+   /** In bytes */
+   public long used() {
+      return top().minus(bottom());
+   }
+
+   /** returns all MemRegions where live objects are */
+   public List/*<MemRegion>*/ getLiveRegions() {
+      List res = new ArrayList();
+      res.add(new MemRegion(bottom(), top()));
+      return res;
+   }
+
+   public void printOn(PrintStream tty) {
+      tty.print(" [" + bottom() + "," +
+                top() + "," + end() + "] ");
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSOldGen.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.parallel;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class PSOldGen extends VMObject {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("PSOldGen");
+      objectSpaceField = type.getAddressField("_object_space");
+   }
+
+   public PSOldGen(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField objectSpaceField;
+
+   // Accessors
+   public MutableSpace objectSpace() {
+      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, objectSpaceField.getValue(addr));
+   }
+
+   public long capacity() {
+      return objectSpace().capacity();
+   }
+
+   public long used() {
+      return objectSpace().used();
+   }
+
+   public boolean isIn(Address a) {
+      return objectSpace().contains(a);
+   }
+
+   public void printOn(PrintStream tty) {
+      tty.print("PSOldGen [ ");
+      objectSpace().printOn(tty);
+      tty.print(" ] ");
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSYoungGen.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.parallel;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class PSYoungGen extends VMObject {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("PSYoungGen");
+      edenSpaceField = type.getAddressField("_eden_space");
+      fromSpaceField = type.getAddressField("_from_space");
+      toSpaceField = type.getAddressField("_to_space");
+   }
+
+   public PSYoungGen(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField edenSpaceField;
+   private static AddressField fromSpaceField;
+   private static AddressField toSpaceField;
+
+   // Accessors
+   public MutableSpace edenSpace() {
+      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, edenSpaceField.getValue(addr));
+   }
+
+   public MutableSpace fromSpace() {
+      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, fromSpaceField.getValue(addr));
+   }
+
+   public MutableSpace toSpace() {
+      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, toSpaceField.getValue(addr));
+   }
+
+   public long capacity() {
+      return edenSpace().capacity() + fromSpace().capacity();
+   }
+
+   public long used() {
+      return edenSpace().used() + fromSpace().used();
+   }
+
+   public boolean isIn(Address a) {
+      if (edenSpace().contains(a)) {
+         return true;
+      }
+
+      if (fromSpace().contains(a)) {
+         return true;
+      }
+      return false;
+   }
+
+   public void printOn(PrintStream tty) {
+      tty.print("PSYoungGen [ ");
+      tty.print("eden = ");
+      edenSpace().printOn(tty);
+      tty.print(", from = ");
+      fromSpace().printOn(tty);
+      tty.print(", to = ");
+      toSpace().printOn(tty);
+      tty.print(" ] ");
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ParallelScavengeHeap.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2003, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.parallel;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class ParallelScavengeHeap extends CollectedHeap {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("ParallelScavengeHeap");
+      youngGenField = type.getAddressField("_young_gen");
+      oldGenField    = type.getAddressField("_old_gen");
+   }
+
+   public ParallelScavengeHeap(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField youngGenField;
+   private static AddressField oldGenField;
+
+   // Accessors
+   public PSYoungGen youngGen() {
+      return (PSYoungGen) VMObjectFactory.newObject(PSYoungGen.class, youngGenField.getValue());
+   }
+
+   public PSOldGen oldGen() {
+      return (PSOldGen) VMObjectFactory.newObject(PSOldGen.class, oldGenField.getValue());
+   }
+
+   public long capacity() {
+      return youngGen().capacity() + oldGen().capacity();
+   }
+
+   public long used() {
+      return youngGen().used() + oldGen().used();
+   }
+
+   public boolean isIn(Address a) {
+      if (youngGen().isIn(a)) {
+         return true;
+      }
+
+      if (oldGen().isIn(a)) {
+         return true;
+      }
+
+      return false;
+   }
+
+   public CollectedHeapName kind() {
+      return CollectedHeapName.PARALLEL_SCAVENGE_HEAP;
+   }
+
+   public void printOn(PrintStream tty) {
+      tty.print("ParallelScavengeHeap [ ");
+      youngGen().printOn(tty);
+      oldGen().printOn(tty);
+      tty.print(" ] ");
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/serial/DefNewGeneration.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.serial;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** DefNewGeneration is a young generation containing eden, from- and
+    to-space. */
+
+public class DefNewGeneration extends Generation {
+  protected static AddressField edenSpaceField;
+  protected static AddressField fromSpaceField;
+  protected static AddressField toSpaceField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("DefNewGeneration");
+
+    edenSpaceField = type.getAddressField("_eden_space");
+    fromSpaceField = type.getAddressField("_from_space");
+    toSpaceField   = type.getAddressField("_to_space");
+  }
+
+  public DefNewGeneration(Address addr) {
+    super(addr);
+  }
+
+  public Generation.Name kind() {
+    return Generation.Name.DEF_NEW;
+  }
+
+  // Accessing spaces
+  public ContiguousSpace eden() {
+    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, edenSpaceField.getValue(addr));
+  }
+
+  public ContiguousSpace from() {
+    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, fromSpaceField.getValue(addr));
+  }
+
+  public ContiguousSpace to() {
+    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, toSpaceField.getValue(addr));
+  }
+
+  public long capacity()            { return eden().capacity() + from().capacity(); /* to() is only used during scavenge */ }
+  public long used()                { return eden().used()     + from().used();     /* to() is only used during scavenge */ }
+  public long free()                { return eden().free()     + from().free();     /* to() is only used during scavenge */ }
+  public long contiguousAvailable() { return eden().free(); }
+
+  public String name() {
+    return "default new generation";
+  }
+
+  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
+    blk.doSpace(eden());
+    blk.doSpace(from());
+    if (!usedOnly) {
+      blk.doSpace(to());
+    }
+  }
+
+  public void printOn(PrintStream tty) {
+    tty.print("  eden");
+    eden().printOn(tty);
+    tty.print("\n  from");
+    from().printOn(tty);
+    tty.print("\n  to  ");
+    to().printOn(tty);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.serial;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** <P> TenuredGeneration models a heap of old objects contained
+    in a single contiguous space. </P>
+
+    <P> Garbage collection is performed using mark-compact. </P> */
+
+public class TenuredGeneration extends CardGeneration {
+  private static AddressField theSpaceField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("TenuredGeneration");
+
+    theSpaceField = type.getAddressField("_the_space");
+  }
+
+  public TenuredGeneration(Address addr) {
+    super(addr);
+  }
+
+  public ContiguousSpace theSpace() {
+    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, theSpaceField.getValue(addr));
+  }
+
+  public boolean isIn(Address p) {
+    return theSpace().contains(p);
+  }
+
+  /** Space queries */
+  public long capacity()            { return theSpace().capacity();                                }
+  public long used()                { return theSpace().used();                                    }
+  public long free()                { return theSpace().free();                                    }
+  public long contiguousAvailable() { return theSpace().free() + virtualSpace().uncommittedSize(); }
+
+  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
+    blk.doSpace(theSpace());
+  }
+
+  public void printOn(PrintStream tty) {
+    tty.print("  old ");
+    theSpace().printOn(tty);
+  }
+
+  public Generation.Name kind() {
+    return Generation.Name.MARK_SWEEP_COMPACT;
+  }
+
+  public String name() {
+    return "tenured generation";
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CardGeneration.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import sun.jvm.hotspot.debugger.*;
+
+/** Class CardGeneration is a generation that is covered by a card
+    table, and uses a card-size block-offset array to implement
+    block_start. */
+
+public abstract class CardGeneration extends Generation {
+  public CardGeneration(Address addr) {
+    super(addr);
+  }
+
+  // FIXME: not sure what I need to expose from here in order to have
+  // verification similar to that of the old RememberedSet
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeap.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public abstract class CollectedHeap extends VMObject {
+  private static long         reservedFieldOffset;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("CollectedHeap");
+
+    reservedFieldOffset = type.getField("_reserved").getOffset();
+  }
+
+  public CollectedHeap(Address addr) {
+    super(addr);
+  }
+
+  /** Returns the lowest address of the heap. */
+  public Address start() {
+    return reservedRegion().start();
+  }
+
+  public long capacity() { return 0; }
+  public long used()     { return 0; }
+
+  public MemRegion reservedRegion() {
+    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
+  }
+
+  public boolean isIn(Address a) {
+    return isInReserved(a);
+  }
+
+  public boolean isInReserved(Address a) {
+    return reservedRegion().contains(a);
+  }
+
+  public abstract CollectedHeapName kind();
+
+  public void print() { printOn(System.out); }
+  public void printOn(PrintStream tty) {
+    MemRegion mr = reservedRegion();
+    tty.println("unknown subtype of CollectedHeap @ " + getAddress() + " (" +
+                mr.start() + "," + mr.end() + ")");
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+/** Mimics the enums in the VM under CollectedHeap::Name */
+
+public class CollectedHeapName {
+  private String name;
+
+  private CollectedHeapName(String name) { this.name = name; }
+
+  public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap");
+  public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap");
+  public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
+
+  public String toString() {
+    return name;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CompactibleSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** A space that supports compaction operations.  This is usually, but
+    not necessarily, a space that is normally contiguous.  But, for
+    example, a free-list-based space whose normal collection is a
+    mark-sweep without compaction could still support compaction in
+    full GC's. */
+
+public abstract class CompactibleSpace extends Space {
+  private static AddressField compactionTopField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("CompactibleSpace");
+
+    compactionTopField = type.getAddressField("_compaction_top");
+  }
+
+  public CompactibleSpace(Address addr) {
+    super(addr);
+  }
+
+  /** May be used temporarily during a compaction phase. */
+  public Address compactionTop() {
+    return compactionTopField.getValue(addr);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/ContiguousSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class ContiguousSpace extends CompactibleSpace {
+  private static AddressField topField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("ContiguousSpace");
+
+    topField = type.getAddressField("_top");
+  }
+
+  public ContiguousSpace(Address addr) {
+    super(addr);
+  }
+
+  public Address top() {
+    return topField.getValue(addr);
+  }
+
+  /** In bytes */
+  public long capacity() {
+    return end().minus(bottom());
+  }
+
+  /** In bytes */
+  public long used() {
+    return top().minus(bottom());
+  }
+
+  /** In bytes */
+  public long free() {
+    return end().minus(top());
+  }
+
+  /** In a contiguous space we have a more obvious bound on what parts
+      contain objects. */
+  public MemRegion usedRegion() {
+    return new MemRegion(bottom(), top());
+  }
+
+  /** Returns regions of Space where live objects live */
+  public List/*<MemRegion>*/ getLiveRegions() {
+    List res = new ArrayList();
+    res.add(new MemRegion(bottom(), top()));
+    return res;
+  }
+
+  /** Testers */
+  public boolean contains(Address p) {
+    return (bottom().lessThanOrEqual(p) && top().greaterThan(p));
+  }
+
+  public void printOn(PrintStream tty) {
+    tty.print(" [" + bottom() + "," +
+                top() + "," + end() + ")");
+    super.printOn(tty);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/G1YCType.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+//These definitions should be kept in sync with the definitions in the HotSpot
+//code.
+
+public enum G1YCType {
+  Normal ("Normal"),
+  InitialMark ("Initial Mark"),
+  DuringMark ("During Mark"),
+  Mixed ("Mixed"),
+  G1YCTypeEndSentinel ("Unknown");
+
+  private final String value;
+
+  G1YCType(String val) {
+    this.value = val;
+  }
+  public String value() {
+    return value;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2014, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+//These definitions should be kept in sync with the definitions in the HotSpot code.
+
+public enum GCCause {
+  _java_lang_system_gc ("System.gc()"),
+  _full_gc_alot ("FullGCAlot"),
+  _scavenge_alot ("ScavengeAlot"),
+  _allocation_profiler ("Allocation Profiler"),
+  _jvmti_force_gc ("JvmtiEnv ForceGarbageCollection"),
+  _gc_locker ("GCLocker Initiated GC"),
+  _heap_inspection ("Heap Inspection Initiated GC"),
+  _heap_dump ("Heap Dump Initiated GC"),
+
+  _no_gc ("No GC"),
+  _no_cause_specified ("Unknown GCCause"),
+  _allocation_failure ("Allocation Failure"),
+
+  _tenured_generation_full ("Tenured Generation Full"),
+  _metadata_GC_threshold ("Metadata GC Threshold"),
+
+  _cms_generation_full ("CMS Generation Full"),
+  _cms_initial_mark ("CMS Initial Mark"),
+  _cms_final_remark ("CMS Final Remark"),
+  _cms_concurrent_mark ("CMS Concurrent Mark"),
+
+  _old_generation_expanded_on_last_scavenge ("Old Generation Expanded On Last Scavenge"),
+  _old_generation_too_full_to_scavenge ("Old Generation Too Full To Scavenge"),
+  _adaptive_size_policy ("Ergonomics"),
+
+  _g1_inc_collection_pause ("G1 Evacuation Pause"),
+  _g1_humongous_allocation ("G1 Humongous Allocation"),
+
+  _last_ditch_collection ("Last ditch collection"),
+  _last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE");
+
+  private final String value;
+
+  GCCause(String val) {
+    this.value = val;
+  }
+  public String value() {
+    return value;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCName.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+//These definitions should be kept in sync with the definitions in the HotSpot code.
+
+public enum GCName {
+  ParallelOld ("ParallelOld"),
+  SerialOld ("SerialOld"),
+  PSMarkSweep ("PSMarkSweep"),
+  ParallelScavenge ("ParallelScavenge"),
+  DefNew ("DefNew"),
+  ParNew ("ParNew"),
+  G1New ("G1New"),
+  ConcurrentMarkSweep ("ConcurrentMarkSweep"),
+  G1Old ("G1Old"),
+  GCNameEndSentinel ("GCNameEndSentinel");
+
+  private final String value;
+
+  GCName(String val) {
+    this.value = val;
+  }
+  public String value() {
+    return value;
+  }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCWhen.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+//These definitions should be kept in sync with the definitions in the HotSpot code.
+
+public enum GCWhen {
+  BeforeGC ("Before GC"),
+  AfterGC ("After GC"),
+  GCWhenEndSentinel ("GCWhenEndSentinel");
+
+  private final String value;
+
+  GCWhen(String val) {
+    this.value = val;
+  }
+  public String value() {
+    return value;
+  }
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class GenCollectedHeap extends CollectedHeap {
+  private static AddressField youngGenField;
+  private static AddressField oldGenField;
+
+  private static AddressField youngGenSpecField;
+  private static AddressField oldGenSpecField;
+
+  private static GenerationFactory genFactory;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("GenCollectedHeap");
+
+    youngGenField = type.getAddressField("_young_gen");
+    oldGenField = type.getAddressField("_old_gen");
+
+    genFactory = new GenerationFactory();
+
+    Type collectorPolicyType = db.lookupType("GenCollectorPolicy");
+    youngGenSpecField = collectorPolicyType.getAddressField("_young_gen_spec");
+    oldGenSpecField = collectorPolicyType.getAddressField("_old_gen_spec");
+  }
+
+  public GenCollectedHeap(Address addr) {
+    super(addr);
+  }
+
+  public int nGens() {
+    return 2; // Young + Old
+  }
+
+  public Generation getGen(int i) {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that((i == 0) || (i == 1), "Index " + i +
+                  " out of range (should be 0 or 1)");
+    }
+
+    switch (i) {
+    case 0:
+      return genFactory.newObject(youngGenField.getValue(addr));
+    case 1:
+      return genFactory.newObject(oldGenField.getValue(addr));
+    default:
+      // no generation for i, and assertions disabled.
+      return null;
+    }
+  }
+
+  public boolean isIn(Address a) {
+    for (int i = 0; i < nGens(); i++) {
+      Generation gen = getGen(i);
+      if (gen.isIn(a)) {
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+  public long capacity() {
+    long capacity = 0;
+    for (int i = 0; i < nGens(); i++) {
+      capacity += getGen(i).capacity();
+    }
+    return capacity;
+  }
+
+  public long used() {
+    long used = 0;
+    for (int i = 0; i < nGens(); i++) {
+      used += getGen(i).used();
+    }
+    return used;
+  }
+
+  /** Package-private access to GenerationSpecs */
+  GenerationSpec spec(int level) {
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that((level == 0) || (level == 1), "Index " + level +
+                  " out of range (should be 0 or 1)");
+    }
+
+    if ((level != 0) && (level != 1)) {
+      return null;
+    }
+
+    if (level == 0) {
+      return (GenerationSpec)
+              VMObjectFactory.newObject(GenerationSpec.class,
+                      youngGenSpecField.getAddress());
+    } else {
+      return (GenerationSpec)
+              VMObjectFactory.newObject(GenerationSpec.class,
+                      oldGenSpecField.getAddress());
+    }
+  }
+
+  public CollectedHeapName kind() {
+    return CollectedHeapName.GEN_COLLECTED_HEAP;
+  }
+
+  public void printOn(PrintStream tty) {
+    for (int i = 0; i < nGens(); i++) {
+      tty.print("Gen " + i + ": ");
+      getGen(i).printOn(tty);
+      tty.println("Invocations: " + getGen(i).invocations());
+      tty.println();
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/Generation.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** <P> The (supported) Generation hierarchy currently looks like this: </P>
+
+    <ul>
+    <li> Generation
+      <ul>
+      <li> CardGeneration
+        <ul>
+        <li> TenuredGeneration
+        </ul>
+      <li> DefNewGeneration
+      </ul>
+    </ul>
+*/
+
+
+public abstract class Generation extends VMObject {
+  private static long          reservedFieldOffset;
+  private static long          virtualSpaceFieldOffset;
+  private static CIntegerField levelField;
+  protected static final int  K = 1024;
+  // Fields for class StatRecord
+  private static Field         statRecordField;
+  private static CIntegerField invocationField;
+
+  // constants from Name enum
+  private static int NAME_DEF_NEW;
+  private static int NAME_PAR_NEW;
+  private static int NAME_MARK_SWEEP_COMPACT;
+  private static int NAME_CONCURRENT_MARK_SWEEP;
+  private static int NAME_OTHER;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("Generation");
+
+    reservedFieldOffset     = type.getField("_reserved").getOffset();
+    virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset();
+    levelField              = type.getCIntegerField("_level");
+    // StatRecord
+    statRecordField         = type.getField("_stat_record");
+    type                    = db.lookupType("Generation::StatRecord");
+    invocationField         = type.getCIntegerField("invocations");
+
+    // constants from Generation::Name
+    NAME_DEF_NEW = db.lookupIntConstant("Generation::DefNew").intValue();
+    NAME_PAR_NEW = db.lookupIntConstant("Generation::ParNew").intValue();
+    NAME_MARK_SWEEP_COMPACT = db.lookupIntConstant("Generation::MarkSweepCompact").intValue();
+    NAME_CONCURRENT_MARK_SWEEP = db.lookupIntConstant("Generation::ConcurrentMarkSweep").intValue();
+    NAME_OTHER = db.lookupIntConstant("Generation::Other").intValue();
+  }
+
+  public Generation(Address addr) {
+    super(addr);
+  }
+
+  public static class Name {
+    public static final Name DEF_NEW = new Name("DefNew");
+    public static final Name PAR_NEW = new Name("ParNew");
+    public static final Name MARK_SWEEP_COMPACT = new Name("MarkSweepCompact");
+    public static final Name CONCURRENT_MARK_SWEEP = new Name("ConcurrentMarkSweep");
+    public static final Name OTHER = new Name("Other");
+
+    private Name(String value) {
+      this.value = value;
+    }
+
+    private String value;
+    public String toString() {
+      return value;
+    }
+  }
+
+  public Generation.Name kind() {
+    return Generation.Name.OTHER;
+  }
+
+  static Generation.Name nameForEnum(int value) {
+     if (value == NAME_DEF_NEW) {
+        return Name.DEF_NEW;
+     } else if (value == NAME_PAR_NEW) {
+        return Name.PAR_NEW;
+     } else if (value == NAME_MARK_SWEEP_COMPACT) {
+        return Name.MARK_SWEEP_COMPACT;
+     } else if (value == NAME_CONCURRENT_MARK_SWEEP) {
+        return Name.CONCURRENT_MARK_SWEEP;
+     } else if (value == NAME_OTHER) {
+        return Name.OTHER;
+     } else {
+        throw new RuntimeException("should not reach here");
+     }
+  }
+
+  public GenerationSpec spec() {
+    return ((GenCollectedHeap) VM.getVM().getUniverse().heap()).spec(level());
+  }
+
+  public int level() {
+    return (int) levelField.getValue(addr);
+  }
+
+  public int invocations() {
+    return getStatRecord().getInvocations();
+  }
+
+  /** The maximum number of object bytes the generation can currently
+      hold. */
+  public abstract long capacity();
+
+  /** The number of used bytes in the gen. */
+  public abstract long used();
+
+  /** The number of free bytes in the gen. */
+  public abstract long free();
+
+  /** The largest number of contiguous free words in the generation,
+      including expansion. (VM's version assumes it is called at a
+      safepoint.)  */
+  public abstract long contiguousAvailable();
+
+  public MemRegion reserved() {
+    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
+  }
+
+  /** Returns a region guaranteed to contain all the objects in the
+      generation. */
+  public MemRegion usedRegion() {
+    return reserved();
+  }
+
+  /* Returns "TRUE" iff "p" points into an allocated object in the
+     generation. */
+  public boolean isIn(Address p) {
+    GenerationIsInClosure blk = new GenerationIsInClosure(p);
+    spaceIterate(blk);
+    return (blk.space() != null);
+  }
+
+  /** Returns "TRUE" iff "p" points into the reserved area of the
+     generation. */
+  public boolean isInReserved(Address p) {
+    return reserved().contains(p);
+  }
+
+  protected VirtualSpace virtualSpace() {
+    return (VirtualSpace) VMObjectFactory.newObject(VirtualSpace.class, addr.addOffsetTo(virtualSpaceFieldOffset));
+  }
+
+  public abstract String name();
+
+  /** Equivalent to spaceIterate(blk, false) */
+  public void spaceIterate(SpaceClosure blk) {
+    spaceIterate(blk, false);
+  }
+
+  /** Iteration - do not use for time critical operations */
+  public abstract void spaceIterate(SpaceClosure blk, boolean usedOnly);
+
+  public void print() { printOn(System.out); }
+  public abstract void printOn(PrintStream tty);
+
+  public static class StatRecord extends VMObject {
+    public StatRecord(Address addr) {
+      super(addr);
+    }
+
+    public int getInvocations() {
+      return (int) invocationField.getValue(addr);
+    }
+
+  }
+
+  private StatRecord getStatRecord() {
+    return (StatRecord) VMObjectFactory.newObject(Generation.StatRecord.class, addr.addOffsetTo(statRecordField.getOffset()));
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationFactory.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.gc.cms.*;
+import sun.jvm.hotspot.gc.serial.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** Factory containing a VirtualConstructor suitable for instantiating
+    wrapper objects for all types of generations */
+
+public class GenerationFactory {
+  private static VirtualConstructor ctor;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    ctor = new VirtualConstructor(db);
+
+    ctor.addMapping("DefNewGeneration", DefNewGeneration.class);
+    ctor.addMapping("ParNewGeneration", ParNewGeneration.class);
+    ctor.addMapping("TenuredGeneration", TenuredGeneration.class);
+    ctor.addMapping("ConcurrentMarkSweepGeneration", ConcurrentMarkSweepGeneration.class);
+  }
+
+  public static Generation newObject(Address addr) {
+      try {
+          return (Generation) ctor.instantiateWrapperFor(addr);
+      } catch (WrongTypeException e) {
+          return new Generation(addr) {
+                  public String name() {
+                      return "unknown generation type";
+                  }
+                  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
+                  }
+                  public void printOn(java.io.PrintStream tty) {
+                      tty.println("unknown subtype of Generation @ " + getAddress() + " (" +
+                                  virtualSpace().low() + "," + virtualSpace().high() + ")");
+                  }
+                  public long used() {
+                      return 0;
+                  }
+                  public long free() {
+                      return 0;
+                  }
+                  public long capacity() {
+                      return 0;
+                  }
+                  public long contiguousAvailable() {
+                      return 0;
+                  }
+
+              };
+      }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationIsInClosure.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import sun.jvm.hotspot.debugger.*;
+
+/** Should only be used once */
+
+class GenerationIsInClosure implements SpaceClosure {
+  private Address p;
+  private Space sp;
+
+  GenerationIsInClosure(Address p) {
+    this.p = p;
+  }
+
+  public void doSpace(Space s) {
+    if (s.contains(p)) {
+      sp = s;
+    }
+  }
+
+  Space space() {
+    return sp;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationSpec.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class GenerationSpec extends VMObject {
+  private static CIntegerField nameField;
+  private static CIntegerField initSizeField;
+  private static CIntegerField maxSizeField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("GenerationSpec");
+
+    nameField       = type.getCIntegerField("_name");
+    initSizeField = type.getCIntegerField("_init_size");
+    maxSizeField  = type.getCIntegerField("_max_size");
+  }
+
+  public GenerationSpec(Address addr) {
+    super(addr);
+  }
+
+  public Generation.Name name() {
+    return Generation.nameForEnum((int)nameField.getValue(addr));
+  }
+
+  public long initSize() {
+    return initSizeField.getValue(addr);
+  }
+
+  public long maxSize() {
+    return maxSizeField.getValue(addr);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/OffsetTableContigSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import sun.jvm.hotspot.debugger.*;
+
+/** No additional functionality for now */
+
+public class OffsetTableContigSpace extends ContiguousSpace {
+  public OffsetTableContigSpace(Address addr) {
+    super(addr);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/Space.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+/** <P> A Space describes a heap area. Class Space is an abstract base
+    class. </P>
+
+    <P> Space supports allocation, size computation and GC support is
+    provided. </P>
+
+    <P> Invariant: bottom() and end() are on page_size boundaries and: </P>
+
+    <P> bottom() <= top() <= end() </P>
+
+    <P> top() is inclusive and end() is exclusive. </P> */
+
+public abstract class Space extends VMObject {
+  private static AddressField bottomField;
+  private static AddressField endField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("Space");
+
+    bottomField = type.getAddressField("_bottom");
+    endField    = type.getAddressField("_end");
+  }
+
+  public Space(Address addr) {
+    super(addr);
+  }
+
+  public Address   bottom()       { return bottomField.getValue(addr); }
+  public Address   end()          { return endField.getValue(addr);    }
+
+  /** Returns a subregion of the space containing all the objects in
+      the space. */
+  public MemRegion usedRegion() {
+    return new MemRegion(bottom(), end());
+  }
+
+  /** Support for iteration over heap -- not sure how this will
+      interact with GC in reflective system, but necessary for the
+      debugging mechanism */
+  public OopHandle bottomAsOopHandle() {
+    return bottomField.getOopHandle(addr);
+  }
+
+  /** Support for iteration over heap -- not sure how this will
+      interact with GC in reflective system, but necessary for the
+      debugging mechanism */
+  public OopHandle nextOopHandle(OopHandle handle, long size) {
+    return handle.addOffsetToAsOopHandle(size);
+  }
+
+  /** returns all MemRegions where live objects are */
+  public abstract List/*<MemRegion>*/ getLiveRegions();
+
+  /** Returned value is in bytes */
+  public long capacity() { return end().minus(bottom()); }
+  /** Returned value is in bytes */
+  public abstract long used();
+  /** Returned value is in bytes */
+  public abstract long free();
+
+  /** Testers */
+  public boolean contains(Address p) {
+    return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
+  }
+
+  public void print() { printOn(System.out); }
+  public void printOn(PrintStream tty) {
+    tty.print(" space capacity = ");
+    tty.print(capacity());
+    tty.print(", ");
+    tty.print((double) used() * 100.0/ capacity());
+    tty.print(" used");
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/SpaceClosure.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+public interface SpaceClosure {
+  public void doSpace(Space s);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/share/classes/sun/jvm/hotspot/gc/shared/TenuredSpace.java	Thu May 28 16:52:47 2015 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2000, 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.gc.shared;
+
+import sun.jvm.hotspot.debugger.*;
+
+/** No additional functionality for now */
+
+public class TenuredSpace extends OffsetTableContigSpace {
+  public TenuredSpace(Address addr) {
+    super(addr);
+  }
+}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-public class G1Allocator extends VMObject {
-
-  //size_t _summary_bytes_used;
-  static private CIntegerField summaryBytesUsedField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-      public void update(Observable o, Object data) {
-        initialize(VM.getVM().getTypeDataBase());
-      }
-    });
-  }
-
-  static private synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("G1Allocator");
-
-    summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
-  }
-
-  public long getSummaryBytes() {
-    return summaryBytesUsedField.getValue(addr);
-  }
-
-  public G1Allocator(Address addr) {
-    super(addr);
-
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.gc_interface.CollectedHeap;
-import sun.jvm.hotspot.gc_interface.CollectedHeapName;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.memory.SpaceClosure;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1CollectedHeap.
-
-public class G1CollectedHeap extends CollectedHeap {
-    // HeapRegionManager _hrm;
-    static private long hrmFieldOffset;
-    // MemRegion _g1_reserved;
-    static private long g1ReservedFieldOffset;
-    // G1Allocator* _allocator
-    static private AddressField g1Allocator;
-    // G1MonitoringSupport* _g1mm;
-    static private AddressField g1mmField;
-    // HeapRegionSet _old_set;
-    static private long oldSetFieldOffset;
-    // HeapRegionSet _humongous_set;
-    static private long humongousSetFieldOffset;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1CollectedHeap");
-
-        hrmFieldOffset = type.getField("_hrm").getOffset();
-        g1Allocator = type.getAddressField("_allocator");
-        g1mmField = type.getAddressField("_g1mm");
-        oldSetFieldOffset = type.getField("_old_set").getOffset();
-        humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
-    }
-
-    public long capacity() {
-        return hrm().capacity();
-    }
-
-    public long used() {
-        return allocator().getSummaryBytes();
-    }
-
-    public long n_regions() {
-        return hrm().length();
-    }
-
-    private HeapRegionManager hrm() {
-        Address hrmAddr = addr.addOffsetTo(hrmFieldOffset);
-        return (HeapRegionManager) VMObjectFactory.newObject(HeapRegionManager.class,
-                                                         hrmAddr);
-    }
-
-    public G1MonitoringSupport g1mm() {
-        Address g1mmAddr = g1mmField.getValue(addr);
-        return (G1MonitoringSupport) VMObjectFactory.newObject(G1MonitoringSupport.class, g1mmAddr);
-    }
-
-    public G1Allocator allocator() {
-        Address g1AllocatorAddr = g1Allocator.getValue(addr);
-        return (G1Allocator) VMObjectFactory.newObject(G1Allocator.class, g1AllocatorAddr);
-    }
-
-    public HeapRegionSetBase oldSet() {
-        Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             oldSetAddr);
-    }
-
-    public HeapRegionSetBase humongousSet() {
-        Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             humongousSetAddr);
-    }
-
-    private Iterator<HeapRegion> heapRegionIterator() {
-        return hrm().heapRegionIterator();
-    }
-
-    public void heapRegionIterate(SpaceClosure scl) {
-        Iterator<HeapRegion> iter = heapRegionIterator();
-        while (iter.hasNext()) {
-            HeapRegion hr = iter.next();
-            scl.doSpace(hr);
-        }
-    }
-
-    public CollectedHeapName kind() {
-        return CollectedHeapName.G1_COLLECTED_HEAP;
-    }
-
-    public G1CollectedHeap(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1HeapRegionTable. It's essentially an index -> HeapRegion map.
-
-public class G1HeapRegionTable extends VMObject {
-    // HeapRegion** _base;
-    static private AddressField baseField;
-    // uint _length;
-    static private CIntegerField lengthField;
-    // HeapRegion** _biased_base
-    static private AddressField biasedBaseField;
-    // size_t _bias
-    static private CIntegerField biasField;
-    // uint _shift_by
-    static private CIntegerField shiftByField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1HeapRegionTable");
-
-        baseField = type.getAddressField("_base");
-        lengthField = type.getCIntegerField("_length");
-        biasedBaseField = type.getAddressField("_biased_base");
-        biasField = type.getCIntegerField("_bias");
-        shiftByField = type.getCIntegerField("_shift_by");
-    }
-
-    private HeapRegion at(long index) {
-        Address arrayAddr = baseField.getValue(addr);
-        // Offset of &_base[index]
-        long offset = index * VM.getVM().getAddressSize();
-        Address regionAddr = arrayAddr.getAddressAt(offset);
-        return (HeapRegion) VMObjectFactory.newObject(HeapRegion.class,
-                                                      regionAddr);
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long bias() {
-        return biasField.getValue(addr);
-    }
-
-    public long shiftBy() {
-        return shiftByField.getValue(addr);
-    }
-
-    private class HeapRegionIterator implements Iterator<HeapRegion> {
-        private long index;
-        private long length;
-        private HeapRegion next;
-
-        public HeapRegion positionToNext() {
-          HeapRegion result = next;
-          while (index < length && at(index) == null) {
-            index++;
-          }
-          if (index < length) {
-            next = at(index);
-            index++; // restart search at next element
-          } else {
-            next = null;
-          }
-          return result;
-        }
-
-        @Override
-        public boolean hasNext() { return next != null;     }
-
-        @Override
-        public HeapRegion next() { return positionToNext(); }
-
-        @Override
-        public void remove()     { /* not supported */      }
-
-        HeapRegionIterator(long totalLength) {
-            index = 0;
-            length = totalLength;
-            positionToNext();
-        }
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator(long committedLength) {
-        return new HeapRegionIterator(committedLength);
-    }
-
-    public G1HeapRegionTable(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1MonitoringSupport.
-
-public class G1MonitoringSupport extends VMObject {
-    // size_t _eden_committed;
-    static private CIntegerField edenCommittedField;
-    // size_t _eden_used;
-    static private CIntegerField edenUsedField;
-    // size_t _survivor_committed;
-    static private CIntegerField survivorCommittedField;
-    // size_t _survivor_used;
-    static private CIntegerField survivorUsedField;
-    // size_t _old_committed;
-    static private CIntegerField oldCommittedField;
-    // size_t _old_used;
-    static private CIntegerField oldUsedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1MonitoringSupport");
-
-        edenCommittedField = type.getCIntegerField("_eden_committed");
-        edenUsedField = type.getCIntegerField("_eden_used");
-        survivorCommittedField = type.getCIntegerField("_survivor_committed");
-        survivorUsedField = type.getCIntegerField("_survivor_used");
-        oldCommittedField = type.getCIntegerField("_old_committed");
-        oldUsedField = type.getCIntegerField("_old_used");
-    }
-
-    public long edenCommitted() {
-        return edenCommittedField.getValue(addr);
-    }
-
-    public long edenUsed() {
-        return edenUsedField.getValue(addr);
-    }
-
-    public long edenRegionNum() {
-        return edenUsed() / HeapRegion.grainBytes();
-    }
-
-    public long survivorCommitted() {
-        return survivorCommittedField.getValue(addr);
-    }
-
-    public long survivorUsed() {
-        return survivorUsedField.getValue(addr);
-    }
-
-    public long survivorRegionNum() {
-        return survivorUsed() / HeapRegion.grainBytes();
-    }
-
-    public long oldCommitted() {
-        return oldCommittedField.getValue(addr);
-    }
-
-    public long oldUsed() {
-        return oldUsedField.getValue(addr);
-    }
-
-    public G1MonitoringSupport(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2011, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.memory.CompactibleSpace;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegion. Currently we don't actually include
-// any of its fields but only iterate over it.
-
-public class HeapRegion extends CompactibleSpace {
-    // static int GrainBytes;
-    static private CIntegerField grainBytesField;
-    static private AddressField topField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegion");
-
-        grainBytesField = type.getCIntegerField("GrainBytes");
-        topField = type.getAddressField("_top");
-
-    }
-
-    static public long grainBytes() {
-        return grainBytesField.getValue();
-    }
-
-    public HeapRegion(Address addr) {
-        super(addr);
-    }
-
-    public Address top() {
-        return topField.getValue(addr);
-    }
-
-    @Override
-    public List getLiveRegions() {
-        List res = new ArrayList();
-        res.add(new MemRegion(bottom(), top()));
-        return res;
-    }
-
-    @Override
-    public long used() {
-        return top().minus(bottom());
-    }
-
-    @Override
-    public long free() {
-        return end().minus(top());
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionManager.
-
-public class HeapRegionManager extends VMObject {
-    // G1HeapRegionTable _regions
-    static private long regionsFieldOffset;
-    // uint _committed_length
-    static private CIntegerField numCommittedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionManager");
-
-        regionsFieldOffset = type.getField("_regions").getOffset();
-        numCommittedField = type.getCIntegerField("_num_committed");
-    }
-
-    private G1HeapRegionTable regions() {
-        Address regionsAddr = addr.addOffsetTo(regionsFieldOffset);
-        return (G1HeapRegionTable) VMObjectFactory.newObject(G1HeapRegionTable.class,
-                                                             regionsAddr);
-    }
-
-    public long capacity() {
-        return length() * HeapRegion.grainBytes();
-    }
-
-    public long length() {
-        return regions().length();
-    }
-
-    public long committedLength() {
-        return numCommittedField.getValue(addr);
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator() {
-        return regions().heapRegionIterator(length());
-    }
-
-    public HeapRegionManager(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetBase. Represents a group of regions.
-
-public class HeapRegionSetBase extends VMObject {
-
-    static private long countField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetBase");
-
-        countField = type.getField("_count").getOffset();
-    }
-
-
-    public HeapRegionSetCount count() {
-        Address countFieldAddr = addr.addOffsetTo(countField);
-        return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr);
-    }
-
-    public HeapRegionSetBase(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetCount. Represents a group of regions.
-
-public class HeapRegionSetCount extends VMObject {
-
-    static private CIntegerField lengthField;
-    static private CIntegerField capacityField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetCount");
-
-        lengthField   = type.getCIntegerField("_length");
-        capacityField = type.getCIntegerField("_capacity");
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long capacity() {
-        return capacityField.getValue(addr);
-    }
-
-    public HeapRegionSetCount(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSOldGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSOldGen");
-      objectSpaceField = type.getAddressField("_object_space");
-   }
-
-   public PSOldGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField objectSpaceField;
-
-   // Accessors
-   public MutableSpace objectSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, objectSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return objectSpace().capacity();
-   }
-
-   public long used() {
-      return objectSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      return objectSpace().contains(a);
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSOldGen [ ");
-      objectSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSYoungGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSYoungGen");
-      edenSpaceField = type.getAddressField("_eden_space");
-      fromSpaceField = type.getAddressField("_from_space");
-      toSpaceField = type.getAddressField("_to_space");
-   }
-
-   public PSYoungGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField edenSpaceField;
-   private static AddressField fromSpaceField;
-   private static AddressField toSpaceField;
-
-   // Accessors
-   public MutableSpace edenSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, edenSpaceField.getValue(addr));
-   }
-
-   public MutableSpace fromSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, fromSpaceField.getValue(addr));
-   }
-
-   public MutableSpace toSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, toSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return edenSpace().capacity() + fromSpace().capacity();
-   }
-
-   public long used() {
-      return edenSpace().used() + fromSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (edenSpace().contains(a)) {
-         return true;
-      }
-
-      if (fromSpace().contains(a)) {
-         return true;
-      }
-      return false;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSYoungGen [ ");
-      tty.print("eden = ");
-      edenSpace().printOn(tty);
-      tty.print(", from = ");
-      fromSpace().printOn(tty);
-      tty.print(", to = ");
-      toSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class ParallelScavengeHeap extends CollectedHeap {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ParallelScavengeHeap");
-      youngGenField = type.getAddressField("_young_gen");
-      oldGenField    = type.getAddressField("_old_gen");
-   }
-
-   public ParallelScavengeHeap(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField youngGenField;
-   private static AddressField oldGenField;
-
-   // Accessors
-   public PSYoungGen youngGen() {
-      return (PSYoungGen) VMObjectFactory.newObject(PSYoungGen.class, youngGenField.getValue());
-   }
-
-   public PSOldGen oldGen() {
-      return (PSOldGen) VMObjectFactory.newObject(PSOldGen.class, oldGenField.getValue());
-   }
-
-   public long capacity() {
-      return youngGen().capacity() + oldGen().capacity();
-   }
-
-   public long used() {
-      return youngGen().used() + oldGen().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (youngGen().isIn(a)) {
-         return true;
-      }
-
-      if (oldGen().isIn(a)) {
-         return true;
-      }
-
-      return false;
-   }
-
-   public CollectedHeapName kind() {
-      return CollectedHeapName.PARALLEL_SCAVENGE_HEAP;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("ParallelScavengeHeap [ ");
-      youngGen().printOn(tty);
-      oldGen().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class ImmutableSpace extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ImmutableSpace");
-      bottomField = type.getAddressField("_bottom");
-      endField    = type.getAddressField("_end");
-   }
-
-   public ImmutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField bottomField;
-   private static AddressField endField;
-
-   // Accessors
-   public Address   bottom()       { return bottomField.getValue(addr); }
-   public Address   end()          { return endField.getValue(addr);    }
-
-   /** Returns a subregion of the space containing all the objects in
-      the space. */
-   public MemRegion usedRegion() {
-      return new MemRegion(bottom(), end());
-   }
-
-   /** Support for iteration over heap -- not sure how this will
-      interact with GC in reflective system, but necessary for the
-      debugging mechanism */
-   public OopHandle bottomAsOopHandle() {
-      return bottomField.getOopHandle(addr);
-   }
-
-   /** returns all MemRegions where live objects are */
-   public abstract List/*<MemRegion>*/ getLiveRegions();
-
-   /** Returned value is in bytes */
-   public long capacity() { return end().minus(bottom()); }
-
-   public abstract long used();
-
-   /** Testers */
-   public boolean contains(Address p) {
-      return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
-   }
-
-   public void print() { printOn(System.out); }
-   public abstract void printOn(PrintStream tty);
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class MutableSpace extends ImmutableSpace {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("MutableSpace");
-      topField    = type.getAddressField("_top");
-   }
-
-   public MutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField topField;
-
-   // Accessors
-   public Address   top()          { return topField.getValue(addr);    }
-
-   /** In bytes */
-   public long used() {
-      return top().minus(bottom());
-   }
-
-   /** returns all MemRegions where live objects are */
-   public List/*<MemRegion>*/ getLiveRegions() {
-      List res = new ArrayList();
-      res.add(new MemRegion(bottom(), top()));
-      return res;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print(" [" + bottom() + "," +
-                top() + "," + end() + "] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class CollectedHeap extends VMObject {
-  private static long         reservedFieldOffset;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CollectedHeap");
-
-    reservedFieldOffset = type.getField("_reserved").getOffset();
-  }
-
-  public CollectedHeap(Address addr) {
-    super(addr);
-  }
-
-  /** Returns the lowest address of the heap. */
-  public Address start() {
-    return reservedRegion().start();
-  }
-
-  public long capacity() { return 0; }
-  public long used()     { return 0; }
-
-  public MemRegion reservedRegion() {
-    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
-  }
-
-  public boolean isIn(Address a) {
-    return isInReserved(a);
-  }
-
-  public boolean isInReserved(Address a) {
-    return reservedRegion().contains(a);
-  }
-
-  public abstract CollectedHeapName kind();
-
-  public void print() { printOn(System.out); }
-  public void printOn(PrintStream tty) {
-    MemRegion mr = reservedRegion();
-    tty.println("unknown subtype of CollectedHeap @ " + getAddress() + " (" +
-                mr.start() + "," + mr.end() + ")");
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-/** Mimics the enums in the VM under CollectedHeap::Name */
-
-public class CollectedHeapName {
-  private String name;
-
-  private CollectedHeapName(String name) { this.name = name; }
-
-  public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap");
-  public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap");
-  public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
-
-  public String toString() {
-    return name;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot
-//code.
-
-public enum G1YCType {
-  Normal ("Normal"),
-  InitialMark ("Initial Mark"),
-  DuringMark ("During Mark"),
-  Mixed ("Mixed"),
-  G1YCTypeEndSentinel ("Unknown");
-
-  private final String value;
-
-  G1YCType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCCause {
-  _java_lang_system_gc ("System.gc()"),
-  _full_gc_alot ("FullGCAlot"),
-  _scavenge_alot ("ScavengeAlot"),
-  _allocation_profiler ("Allocation Profiler"),
-  _jvmti_force_gc ("JvmtiEnv ForceGarbageCollection"),
-  _gc_locker ("GCLocker Initiated GC"),
-  _heap_inspection ("Heap Inspection Initiated GC"),
-  _heap_dump ("Heap Dump Initiated GC"),
-
-  _no_gc ("No GC"),
-  _no_cause_specified ("Unknown GCCause"),
-  _allocation_failure ("Allocation Failure"),
-
-  _tenured_generation_full ("Tenured Generation Full"),
-  _metadata_GC_threshold ("Metadata GC Threshold"),
-
-  _cms_generation_full ("CMS Generation Full"),
-  _cms_initial_mark ("CMS Initial Mark"),
-  _cms_final_remark ("CMS Final Remark"),
-  _cms_concurrent_mark ("CMS Concurrent Mark"),
-
-  _old_generation_expanded_on_last_scavenge ("Old Generation Expanded On Last Scavenge"),
-  _old_generation_too_full_to_scavenge ("Old Generation Too Full To Scavenge"),
-  _adaptive_size_policy ("Ergonomics"),
-
-  _g1_inc_collection_pause ("G1 Evacuation Pause"),
-  _g1_humongous_allocation ("G1 Humongous Allocation"),
-
-  _last_ditch_collection ("Last ditch collection"),
-  _last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE");
-
-  private final String value;
-
-  GCCause(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCName {
-  ParallelOld ("ParallelOld"),
-  SerialOld ("SerialOld"),
-  PSMarkSweep ("PSMarkSweep"),
-  ParallelScavenge ("ParallelScavenge"),
-  DefNew ("DefNew"),
-  ParNew ("ParNew"),
-  G1New ("G1New"),
-  ConcurrentMarkSweep ("ConcurrentMarkSweep"),
-  G1Old ("G1Old"),
-  GCNameEndSentinel ("GCNameEndSentinel");
-
-  private final String value;
-
-  GCName(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCWhen {
-  BeforeGC ("Before GC"),
-  AfterGC ("After GC"),
-  GCWhenEndSentinel ("GCWhenEndSentinel");
-
-  private final String value;
-
-  GCWhen(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
-
-
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum ReferenceType {
-  REF_NONE ("None reference"),       // Regular class
-  REF_OTHER ("Other reference"),     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
-  REF_SOFT ("Soft reference"),       // Subclass of java/lang/ref/SoftReference
-  REF_WEAK ("Weak reference"),       // Subclass of java/lang/ref/WeakReference
-  REF_FINAL ("Final reference"),     // Subclass of java/lang/ref/FinalReference
-  REF_PHANTOM ("Phantom reference"); // Subclass of java/lang/ref/PhantomReference
-
-  private final String value;
-
-  ReferenceType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/AdaptiveFreeList.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * @(#)AdaptiveFreeList.java
- *
- * Copyright (c) 2000, 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-public class AdaptiveFreeList extends VMObject {
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-      public void update(Observable o, Object data) {
-        initialize(VM.getVM().getTypeDataBase());
-      }
-    });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("AdaptiveFreeList<FreeChunk>");
-    sizeField = type.getCIntegerField("_size");
-    countField = type.getCIntegerField("_count");
-    headerSize = type.getSize();
-  }
-
-  // Fields
-  private static CIntegerField sizeField;
-  private static CIntegerField countField;
-  private static long          headerSize;
-
-  //Constructor
-  public AdaptiveFreeList(Address address) {
-    super(address);
-  }
-
-  // Accessors
-  public long size() {
-    return sizeField.getValue(addr);
-  }
-
-  public long count() {
-    return  countField.getValue(addr);
-  }
-
-  public static long sizeOf() {
-    return headerSize;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class CMSBitMap extends VMObject {
-  private static AddressField bmStartWordField;
-  private static CIntegerField bmWordSizeField;
-  private static CIntegerField shifterField;
-  //private static AddressField bmField;
-  private static long virtualSpaceFieldOffset;
-
-  public CMSBitMap(Address addr) {
-    super(addr);
-  }
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CMSBitMap");
-    bmStartWordField = type.getAddressField("_bmStartWord");
-    bmWordSizeField = type.getCIntegerField("_bmWordSize");
-    shifterField = type.getCIntegerField("_shifter");
-    //bmField = type.getAddressField("_bm");
-    virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset();
-  }
-  public void printAll() {
-    System.out.println("bmStartWord(): "+bmStartWord());
-    System.out.println("bmWordSize(): "+bmWordSize());
-    System.out.println("shifter(): "+shifter());
-  }
-
-  public Address bmStartWord() {
-    return bmStartWordField.getValue(addr);
-  }
-  public long bmWordSize() {
-    return bmWordSizeField.getValue(addr);
-  }
-  public long shifter() {
-    return shifterField.getValue(addr);
-  }
-  public VirtualSpace virtualSpace() {
-    return (VirtualSpace) VMObjectFactory.newObject(VirtualSpace.class, addr.addOffsetTo(virtualSpaceFieldOffset));
-  }
-
-  public BitMap bm() {
-    BitMap bitMap = new BitMap((int) (bmWordSize() >> shifter() ));
-    VirtualSpace vs = virtualSpace();
-    bitMap.set_map(vs.low());
-    return bitMap;
-  }
-
-  public Address getNextMarkedWordAddress(Address addr) {
-    Address endWord = bmStartWord().addOffsetTo(bmWordSize());
-    int nextOffset = bm().getNextOneOffset(heapWordToOffset(addr), heapWordToOffset(endWord) );
-    Address nextAddr = offsetToHeapWord(nextOffset);
-    return nextAddr;
-  }
-
-  int heapWordToOffset(Address addr) {
-    int temp = (int)addr.minus(bmStartWord()) / (int) VM.getVM().getAddressSize();
-    int ret_val = temp >> shifter();
-    return ret_val;
-  }
-
-  Address offsetToHeapWord(int offset) {
-    int temp = offset << shifter();
-    return bmStartWord().addOffsetTo(temp*VM.getVM().getAddressSize());
-  }
-
-  boolean isMarked(Address addr) {
-    BitMap bm = bm();
-    return bm.at(heapWordToOffset(addr));
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CMSCollector.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2007, 2013, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class CMSCollector extends VMObject {
-  private static long markBitMapFieldOffset;
-
-  public CMSCollector(Address addr) {
-    super(addr);
-  }
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CMSCollector");
-    markBitMapFieldOffset = type.getField("_markBitMap").getOffset();
-  }
-
-  //Accessing mark bitmap
-  public CMSBitMap markBitMap() {
-   return (CMSBitMap) VMObjectFactory.newObject(
-                                CMSBitMap.class,
-                                addr.addOffsetTo(markBitMapFieldOffset));
-  }
-
-  public long blockSizeUsingPrintezisBits(Address addr) {
-    CMSBitMap markBitMap = markBitMap();
-    long addressSize = VM.getVM().getAddressSize();
-    if ( markBitMap.isMarked(addr) &&  markBitMap.isMarked(addr.addOffsetTo(1*addressSize)) ) {
-      Address nextOneAddr = markBitMap.getNextMarkedWordAddress(addr.addOffsetTo(2*addressSize));
-      //return size in bytes
-      long size =  (nextOneAddr.addOffsetTo(1*addressSize)).minus(addr);
-      return size;
-    } else {
-      //missing Printezis marks
-      return -1;
-    }
-
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CardGeneration.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import sun.jvm.hotspot.debugger.*;
-
-/** Class CardGeneration is a generation that is covered by a card
-    table, and uses a card-size block-offset array to implement
-    block_start. */
-
-public abstract class CardGeneration extends Generation {
-  public CardGeneration(Address addr) {
-    super(addr);
-  }
-
-  // FIXME: not sure what I need to expose from here in order to have
-  // verification similar to that of the old RememberedSet
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.debugger.Debugger;
-import sun.jvm.hotspot.oops.ObjectHeap;
-import sun.jvm.hotspot.oops.Oop;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class CompactibleFreeListSpace extends CompactibleSpace {
-   private static AddressField collectorField;
-   private static AddressField indexedFreeListField;
-   private static AddressField dictionaryField;
-   private static long         smallLinearAllocBlockFieldOffset;
-
-   private int    heapWordSize;     // 4 for 32bit, 8 for 64 bits
-   private int    IndexSetStart;    // for small indexed list
-   private int    IndexSetSize;
-   private int    IndexSetStride;
-
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      long sizeofFreeChunk = db.lookupType("FreeChunk").getSize();
-      VM vm = VM.getVM();
-      MinChunkSizeInBytes = numQuanta(sizeofFreeChunk, vm.getMinObjAlignmentInBytes()) *
-                     vm.getMinObjAlignmentInBytes();
-
-     Type type = db.lookupType("CompactibleFreeListSpace");
-     collectorField = type.getAddressField("_collector");
-     collectorField       = type.getAddressField("_collector");
-     dictionaryField      = type.getAddressField("_dictionary");
-     indexedFreeListField = type.getAddressField("_indexedFreeList[0]");
-     smallLinearAllocBlockFieldOffset = type.getField("_smallLinearAllocBlock").getOffset();
-   }
-
-   public CompactibleFreeListSpace(Address addr) {
-      super(addr);
-      VM vm = VM.getVM();
-      heapWordSize   = vm.getHeapWordSize();
-      IndexSetStart  = vm.getMinObjAlignmentInBytes() / heapWordSize;
-      IndexSetStride = IndexSetStart;
-      IndexSetSize   = 257;
-   }
-
-   // Accessing block offset table
-   public CMSCollector collector() {
-    return (CMSCollector) VMObjectFactory.newObject(
-                                 CMSCollector.class,
-                                 collectorField.getValue(addr));
-   }
-
-   public long free0() {
-     return capacity() - used0();
-   }
-
-   public long used() {
-     return capacity() - free();
-   }
-
-   public long used0() {
-      List regions = getLiveRegions();
-      long usedSize = 0L;
-      for (Iterator itr = regions.iterator(); itr.hasNext();) {
-         MemRegion mr = (MemRegion) itr.next();
-         usedSize += mr.byteSize();
-      }
-      return usedSize;
-   }
-
-   public long free() {
-      // small chunks
-      long size = 0;
-      Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() );
-      cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf());
-      for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) {
-         AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur);
-         size += i*freeList.count();
-         cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf());
-      }
-
-      // large block
-      AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class,
-                                                                                   dictionaryField.getValue(addr));
-      size += aflbd.size();
-
-
-      // linear block in TLAB
-      LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class,
-                                                                          addr.addOffsetTo(smallLinearAllocBlockFieldOffset));
-      size += lab.word_size();
-
-      return size*heapWordSize;
-  }
-
-   public void printOn(PrintStream tty) {
-      tty.print("free-list-space");
-      tty.print("[ " + bottom() + " , " + end() + " ) ");
-      long cap = capacity();
-      long used_size = used();
-      long free_size = free();
-      int  used_perc = (int)((double)used_size/cap*100);
-      tty.print("space capacity = " + cap + " used(" + used_perc + "%)= " + used_size + " ");
-      tty.print("free= " + free_size );
-      tty.print("\n");
-
-   }
-
-   public Address skipBlockSizeUsingPrintezisBits(Address pos) {
-       CMSCollector collector = collector();
-       long size = 0;
-       Address addr = null;
-
-       if (collector != null) {
-         size = collector.blockSizeUsingPrintezisBits(pos);
-         if (size >= 3) {
-           addr = pos.addOffsetTo(adjustObjectSizeInBytes(size));
-         }
-       }
-       return addr;
-   }
-
-   public List/*<MemRegion>*/ getLiveRegions() {
-      List res = new ArrayList(); // List<MemRegion>
-      VM vm = VM.getVM();
-      Debugger dbg = vm.getDebugger();
-      ObjectHeap heap = vm.getObjectHeap();
-      Address cur = bottom();
-      Address regionStart = cur;
-      Address limit = end();
-      final long addressSize = vm.getAddressSize();
-
-      for (; cur.lessThan(limit);) {
-         Address k = cur.getAddressAt(addressSize);
-         if (FreeChunk.indicatesFreeChunk(cur)) {
-            if (! cur.equals(regionStart)) {
-               res.add(new MemRegion(regionStart, cur));
-            }
-            FreeChunk fc = (FreeChunk) VMObjectFactory.newObject(FreeChunk.class, cur);
-            long chunkSize = fc.size();
-            if (Assert.ASSERTS_ENABLED) {
-               Assert.that(chunkSize > 0, "invalid FreeChunk size");
-            }
-            // note that fc.size() gives chunk size in heap words
-            cur = cur.addOffsetTo(chunkSize * addressSize);
-            regionStart = cur;
-         } else if (k != null) {
-            Oop obj = heap.newOop(cur.addOffsetToAsOopHandle(0));
-            long objectSize = obj.getObjectSize();
-            cur = cur.addOffsetTo(adjustObjectSizeInBytes(objectSize));
-         } else {
-            // FIXME: need to do a better job here.
-            // can I use bitMap here?
-            //Find the object size using Printezis bits and skip over
-            long size = collector().blockSizeUsingPrintezisBits(cur);
-            if (size == -1) {
-              break;
-            }
-            cur = cur.addOffsetTo(adjustObjectSizeInBytes(size));
-         }
-      }
-      return res;
-   }
-
-   //-- Internals only below this point
-
-   // Unlike corresponding VM code, we operate on byte size rather than
-   // HeapWord size for convenience.
-
-   private static long numQuanta(long x, long y) {
-      return  ((x+y-1)/y);
-   }
-
-   public static long adjustObjectSizeInBytes(long sizeInBytes) {
-      return Oop.alignObjectSize(Math.max(sizeInBytes, MinChunkSizeInBytes));
-   }
-
-   // FIXME: should I read this directly from VM?
-   private static long MinChunkSizeInBytes;
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleSpace.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2000, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-/** A space that supports compaction operations.  This is usually, but
-    not necessarily, a space that is normally contiguous.  But, for
-    example, a free-list-based space whose normal collection is a
-    mark-sweep without compaction could still support compaction in
-    full GC's. */
-
-public abstract class CompactibleSpace extends Space {
-  private static AddressField compactionTopField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CompactibleSpace");
-
-    compactionTopField = type.getAddressField("_compaction_top");
-  }
-
-  public CompactibleSpace(Address addr) {
-    super(addr);
-  }
-
-  /** May be used temporarily during a compaction phase. */
-  public Address compactionTop() {
-    return compactionTopField.getValue(addr);
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/ConcurrentMarkSweepGeneration.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class ConcurrentMarkSweepGeneration extends CardGeneration {
-  private static AddressField cmsSpaceField;
-
-  public ConcurrentMarkSweepGeneration(Address addr) {
-    super(addr);
-  }
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("ConcurrentMarkSweepGeneration");
-    cmsSpaceField = type.getAddressField("_cmsSpace");
-  }
-
-  // Accessing space
-  public CompactibleFreeListSpace cmsSpace() {
-    return (CompactibleFreeListSpace) VMObjectFactory.newObject(
-                                 CompactibleFreeListSpace.class,
-                                 cmsSpaceField.getValue(addr));
-  }
-
-  public long capacity()                { return cmsSpace().capacity(); }
-  public long used()                    { return cmsSpace().used(); }
-  public long free()                    { return cmsSpace().free(); }
-  public long contiguousAvailable()     { throw new RuntimeException("not yet implemented"); }
-  public boolean contains(Address p)    { return cmsSpace().contains(p); }
-  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
-     blk.doSpace(cmsSpace());
-  }
-
-  public Generation.Name kind() {
-    return Generation.Name.CONCURRENT_MARK_SWEEP;
-  }
-
-  public String name() {
-    return "concurrent mark-sweep generation";
-  }
-
-  public void printOn(PrintStream tty) {
-    tty.println(name());
-    cmsSpace().printOn(tty);
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/ContiguousSpace.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2000, 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class ContiguousSpace extends CompactibleSpace {
-  private static AddressField topField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("ContiguousSpace");
-
-    topField = type.getAddressField("_top");
-  }
-
-  public ContiguousSpace(Address addr) {
-    super(addr);
-  }
-
-  public Address top() {
-    return topField.getValue(addr);
-  }
-
-  /** In bytes */
-  public long capacity() {
-    return end().minus(bottom());
-  }
-
-  /** In bytes */
-  public long used() {
-    return top().minus(bottom());
-  }
-
-  /** In bytes */
-  public long free() {
-    return end().minus(top());
-  }
-
-  /** In a contiguous space we have a more obvious bound on what parts
-      contain objects. */
-  public MemRegion usedRegion() {
-    return new MemRegion(bottom(), top());
-  }
-
-  /** Returns regions of Space where live objects live */
-  public List/*<MemRegion>*/ getLiveRegions() {
-    List res = new ArrayList();
-    res.add(new MemRegion(bottom(), top()));
-    return res;
-  }
-
-  /** Testers */
-  public boolean contains(Address p) {
-    return (bottom().lessThanOrEqual(p) && top().greaterThan(p));
-  }
-
-  public void printOn(PrintStream tty) {
-    tty.print(" [" + bottom() + "," +
-                top() + "," + end() + ")");
-    super.printOn(tty);
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/DefNewGeneration.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2000, 2008, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-/** DefNewGeneration is a young generation containing eden, from- and
-    to-space. */
-
-public class DefNewGeneration extends Generation {
-  protected static AddressField edenSpaceField;
-  protected static AddressField fromSpaceField;
-  protected static AddressField toSpaceField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("DefNewGeneration");
-
-    edenSpaceField = type.getAddressField("_eden_space");
-    fromSpaceField = type.getAddressField("_from_space");
-    toSpaceField   = type.getAddressField("_to_space");
-  }
-
-  public DefNewGeneration(Address addr) {
-    super(addr);
-  }
-
-  public Generation.Name kind() {
-    return Generation.Name.DEF_NEW;
-  }
-
-  // Accessing spaces
-  public ContiguousSpace eden() {
-    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, edenSpaceField.getValue(addr));
-  }
-
-  public ContiguousSpace from() {
-    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, fromSpaceField.getValue(addr));
-  }
-
-  public ContiguousSpace to() {
-    return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, toSpaceField.getValue(addr));
-  }
-
-  public long capacity()            { return eden().capacity() + from().capacity(); /* to() is only used during scavenge */ }
-  public long used()                { return eden().used()     + from().used();     /* to() is only used during scavenge */ }
-  public long free()                { return eden().free()     + from().free();     /* to() is only used during scavenge */ }
-  public long contiguousAvailable() { return eden().free(); }
-
-  public String name() {
-    return "default new generation";
-  }
-
-  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
-    blk.doSpace(eden());
-    blk.doSpace(from());
-    if (!usedOnly) {
-      blk.doSpace(to());
-    }
-  }
-
-  public void printOn(PrintStream tty) {
-    tty.print("  eden");
-    eden().printOn(tty);
-    tty.print("\n  from");
-    from().printOn(tty);
-    tty.print("\n  to  ");
-    to().printOn(tty);
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class GenCollectedHeap extends CollectedHeap {
-  private static AddressField youngGenField;
-  private static AddressField oldGenField;
-
-  private static AddressField youngGenSpecField;
-  private static AddressField oldGenSpecField;
-
-  private static GenerationFactory genFactory;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("GenCollectedHeap");
-
-    youngGenField = type.getAddressField("_young_gen");
-    oldGenField = type.getAddressField("_old_gen");
-
-    genFactory = new GenerationFactory();
-
-    Type collectorPolicyType = db.lookupType("GenCollectorPolicy");
-    youngGenSpecField = collectorPolicyType.getAddressField("_young_gen_spec");
-    oldGenSpecField = collectorPolicyType.getAddressField("_old_gen_spec");
-  }
-
-  public GenCollectedHeap(Address addr) {
-    super(addr);
-  }
-
-  public int nGens() {
-    return 2; // Young + Old
-  }
-
-  public Generation getGen(int i) {
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that((i == 0) || (i == 1), "Index " + i +
-                  " out of range (should be 0 or 1)");
-    }
-
-    switch (i) {
-    case 0:
-      return genFactory.newObject(youngGenField.getValue(addr));
-    case 1:
-      return genFactory.newObject(oldGenField.getValue(addr));
-    default:
-      // no generation for i, and assertions disabled.
-      return null;
-    }
-  }
-
-  public boolean isIn(Address a) {
-    for (int i = 0; i < nGens(); i++) {
-      Generation gen = getGen(i);
-      if (gen.isIn(a)) {
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  public long capacity() {
-    long capacity = 0;
-    for (int i = 0; i < nGens(); i++) {
-      capacity += getGen(i).capacity();
-    }
-    return capacity;
-  }
-
-  public long used() {
-    long used = 0;
-    for (int i = 0; i < nGens(); i++) {
-      used += getGen(i).used();
-    }
-    return used;
-  }
-
-  /** Package-private access to GenerationSpecs */
-  GenerationSpec spec(int level) {
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that((level == 0) || (level == 1), "Index " + level +
-                  " out of range (should be 0 or 1)");
-    }
-
-    if ((level != 0) && (level != 1)) {
-      return null;
-    }
-
-    if (level == 0) {
-      return (GenerationSpec)
-              VMObjectFactory.newObject(GenerationSpec.class,
-                      youngGenSpecField.getAddress());
-    } else {
-      return (GenerationSpec)
-              VMObjectFactory.newObject(GenerationSpec.class,
-                      oldGenSpecField.getAddress());
-    }
-  }
-
-  public CollectedHeapName kind() {
-    return CollectedHeapName.GEN_COLLECTED_HEAP;
-  }
-
-  public void printOn(PrintStream tty) {
-    for (int i = 0; i < nGens(); i++) {
-      tty.print("Gen " + i + ": ");
-      getGen(i).printOn(tty);
-      tty.println("Invocations: " + getGen(i).invocations());
-      tty.println();
-    }
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/Generation.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.runtime.*;
-
-/** <P> The (supported) Generation hierarchy currently looks like this: </P>
-
-    <ul>
-    <li> Generation
-      <ul>
-      <li> CardGeneration
-        <ul>
-        <li> TenuredGeneration
-        </ul>
-      <li> DefNewGeneration
-      </ul>
-    </ul>
-*/
-
-
-public abstract class Generation extends VMObject {
-  private static long          reservedFieldOffset;
-  private static long          virtualSpaceFieldOffset;
-  private static CIntegerField levelField;
-  protected static final int  K = 1024;
-  // Fields for class StatRecord
-  private static Field         statRecordField;
-  private static CIntegerField invocationField;
-
-  // constants from Name enum
-  private static int NAME_DEF_NEW;
-  private static int NAME_PAR_NEW;
-  private static int NAME_MARK_SWEEP_COMPACT;
-  private static int NAME_CONCURRENT_MARK_SWEEP;
-  private static int NAME_OTHER;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("Generation");
-
-    reservedFieldOffset     = type.getField("_reserved").getOffset();
-    virtualSpaceFieldOffset = type.getField("_virtual_space").getOffset();
-    levelField              = type.getCIntegerField("_level");
-    // StatRecord
-    statRecordField         = type.getField("_stat_record");
-    type                    = db.lookupType("Generation::StatRecord");
-    invocationField         = type.getCIntegerField("invocations");
-
-    // constants from Generation::Name
-    NAME_DEF_NEW = db.lookupIntConstant("Generation::DefNew").intValue();
-    NAME_PAR_NEW = db.lookupIntConstant("Generation::ParNew").intValue();
-    NAME_MARK_SWEEP_COMPACT = db.lookupIntConstant("Generation::MarkSweepCompact").intValue();
-    NAME_CONCURRENT_MARK_SWEEP = db.lookupIntConstant("Generation::ConcurrentMarkSweep").intValue();
-    NAME_OTHER = db.lookupIntConstant("Generation::Other").intValue();
-  }
-
-  public Generation(Address addr) {
-    super(addr);
-  }
-
-  public static class Name {
-    public static final Name DEF_NEW = new Name("DefNew");
-    public static final Name PAR_NEW = new Name("ParNew");
-    public static final Name MARK_SWEEP_COMPACT = new Name("MarkSweepCompact");
-    public static final Name CONCURRENT_MARK_SWEEP = new Name("ConcurrentMarkSweep");
-    public static final Name OTHER = new Name("Other");
-
-    private Name(String value) {
-      this.value = value;
-    }
-
-    private String value;
-    public String toString() {
-      return value;
-    }
-  }
-
-  public Generation.Name kind() {
-    return Generation.Name.OTHER;
-  }
-
-  static Generation.Name nameForEnum(int value) {
-     if (value == NAME_DEF_NEW) {
-        return Name.DEF_NEW;
-     } else if (value == NAME_PAR_NEW) {
-        return Name.PAR_NEW;
-     } else if (value == NAME_MARK_SWEEP_COMPACT) {
-        return Name.MARK_SWEEP_COMPACT;
-     } else if (value == NAME_CONCURRENT_MARK_SWEEP) {
-        return Name.CONCURRENT_MARK_SWEEP;
-     } else if (value == NAME_OTHER) {
-        return Name.OTHER;
-     } else {
-        throw new RuntimeException("should not reach here");
-     }
-  }
-
-  public GenerationSpec spec() {
-    return ((GenCollectedHeap) VM.getVM().getUniverse().heap()).spec(level());
-  }
-
-  public int level() {
-    return (int) levelField.getValue(addr);
-  }
-
-  public int invocations() {
-    return getStatRecord().getInvocations();
-  }
-
-  /** The maximum number of object bytes the generation can currently
-      hold. */
-  public abstract long capacity();
-
-  /** The number of used bytes in the gen. */
-  public abstract long used();
-
-  /** The number of free bytes in the gen. */
-  public abstract long free();
-
-  /** The largest number of contiguous free words in the generation,
-      including expansion. (VM's version assumes it is called at a
-      safepoint.)  */
-  public abstract long contiguousAvailable();
-
-  public MemRegion reserved() {
-    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
-  }
-
-  /** Returns a region guaranteed to contain all the objects in the
-      generation. */
-  public MemRegion usedRegion() {
-    return reserved();
-  }
-
-  /* Returns "TRUE" iff "p" points into an allocated object in the
-     generation. */
-  public boolean isIn(Address p) {
-    GenerationIsInClosure blk = new GenerationIsInClosure(p);
-    spaceIterate(blk);
-    return (blk.space() != null);
-  }
-
-  /** Returns "TRUE" iff "p" points into the reserved area of the
-     generation. */
-  public boolean isInReserved(Address p) {
-    return reserved().contains(p);
-  }
-
-  protected VirtualSpace virtualSpace() {
-    return (VirtualSpace) VMObjectFactory.newObject(VirtualSpace.class, addr.addOffsetTo(virtualSpaceFieldOffset));
-  }
-
-  public abstract String name();
-
-  /** Equivalent to spaceIterate(blk, false) */
-  public void spaceIterate(SpaceClosure blk) {
-    spaceIterate(blk, false);
-  }
-
-  /** Iteration - do not use for time critical operations */
-  public abstract void spaceIterate(SpaceClosure blk, boolean usedOnly);
-
-  public void print() { printOn(System.out); }
-  public abstract void printOn(PrintStream tty);
-
-  public static class StatRecord extends VMObject {
-    public StatRecord(Address addr) {
-      super(addr);
-    }
-
-    public int getInvocations() {
-      return (int) invocationField.getValue(addr);
-    }
-
-  }
-
-  private StatRecord getStatRecord() {
-    return (StatRecord) VMObjectFactory.newObject(Generation.StatRecord.class, addr.addOffsetTo(statRecordField.getOffset()));
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationFactory.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-/** Factory containing a VirtualConstructor suitable for instantiating
-    wrapper objects for all types of generations */
-
-public class GenerationFactory {
-  private static VirtualConstructor ctor;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    ctor = new VirtualConstructor(db);
-
-    ctor.addMapping("DefNewGeneration", DefNewGeneration.class);
-    ctor.addMapping("ParNewGeneration", ParNewGeneration.class);
-    ctor.addMapping("TenuredGeneration", TenuredGeneration.class);
-    ctor.addMapping("ConcurrentMarkSweepGeneration", ConcurrentMarkSweepGeneration.class);
-  }
-
-  public static Generation newObject(Address addr) {
-      try {
-          return (Generation) ctor.instantiateWrapperFor(addr);
-      } catch (WrongTypeException e) {
-          return new Generation(addr) {
-                  public String name() {
-                      return "unknown generation type";
-                  }
-                  public void spaceIterate(SpaceClosure blk, boolean usedOnly) {
-                  }
-                  public void printOn(java.io.PrintStream tty) {
-                      tty.println("unknown subtype of Generation @ " + getAddress() + " (" +
-                                  virtualSpace().low() + "," + virtualSpace().high() + ")");
-                  }
-                  public long used() {
-                      return 0;
-                  }
-                  public long free() {
-                      return 0;
-                  }
-                  public long capacity() {
-                      return 0;
-                  }
-                  public long contiguousAvailable() {
-                      return 0;
-                  }
-
-              };
-      }
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationIsInClosure.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import sun.jvm.hotspot.debugger.*;
-
-/** Should only be used once */
-
-class GenerationIsInClosure implements SpaceClosure {
-  private Address p;
-  private Space sp;
-
-  GenerationIsInClosure(Address p) {
-    this.p = p;
-  }
-
-  public void doSpace(Space s) {
-    if (s.contains(p)) {
-      sp = s;
-    }
-  }
-
-  Space space() {
-    return sp;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationSpec.java	Thu May 28 16:13:49 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.memory;
-
-import java.util.*;
-