changeset 30849:fcfa8eb95c23

Merge
author duke
date Wed, 05 Jul 2017 20:36:12 +0200
parents c275389a3680 031f40760fea
children 56166ce66037
files hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/AdaptiveFreeList.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CMSCollector.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CardGeneration.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ConcurrentMarkSweepGeneration.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ContiguousSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/DefNewGeneration.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Generation.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationFactory.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationIsInClosure.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenerationSpec.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/LinearAllocBlock.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/OffsetTableContigSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ParNewGeneration.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Space.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SpaceClosure.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/TenuredGeneration.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/TenuredSpace.java hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.inline.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.cpp hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.inline.hpp hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp hotspot/src/share/vm/gc_implementation/g1/evacuationInfo.hpp hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1AllocationContext.hpp hotspot/src/share/vm/gc_implementation/g1/g1Allocator.cpp hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp hotspot/src/share/vm/gc_implementation/g1/g1Allocator_ext.cpp hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.cpp hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.hpp hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp hotspot/src/share/vm/gc_implementation/g1/g1ErgoVerbose.cpp hotspot/src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.cpp hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp hotspot/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp hotspot/src/share/vm/gc_implementation/g1/g1HRPrinter.hpp hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.hpp hotspot/src/share/vm/gc_implementation/g1/g1InCSetState.hpp hotspot/src/share/vm/gc_implementation/g1/g1Log.cpp hotspot/src/share/vm/gc_implementation/g1/g1Log.hpp hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep_ext.cpp hotspot/src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp hotspot/src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.cpp hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.hpp hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.hpp hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp hotspot/src/share/vm/gc_implementation/g1/g1RootProcessor.cpp hotspot/src/share/vm/gc_implementation/g1/g1RootProcessor.hpp hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedup.cpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedup.hpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.hpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupStat.cpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupStat.hpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.hpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.hpp hotspot/src/share/vm/gc_implementation/g1/g1YCTypes.hpp hotspot/src/share/vm/gc_implementation/g1/g1_globals.cpp hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionBounds.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionBounds.inline.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.inline.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp hotspot/src/share/vm/gc_implementation/g1/heapRegionType.cpp hotspot/src/share/vm/gc_implementation/g1/heapRegionType.hpp hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp hotspot/src/share/vm/gc_implementation/g1/survRateGroup.hpp hotspot/src/share/vm/gc_implementation/g1/vmStructs_g1.hpp hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.cpp hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.hpp hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp hotspot/src/share/vm/gc_implementation/parNew/vmStructs_parNew.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp hotspot/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.hpp hotspot/src/share/vm/gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp hotspot/src/share/vm/gc_implementation/shared/ageTable.cpp hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp hotspot/src/share/vm/gc_implementation/shared/allocationStats.cpp hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.cpp hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp hotspot/src/share/vm/gc_implementation/shared/collectorCounters.cpp hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp hotspot/src/share/vm/gc_implementation/shared/copyFailedInfo.hpp hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.cpp hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.cpp hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp hotspot/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp hotspot/src/share/vm/gc_implementation/shared/gcId.cpp hotspot/src/share/vm/gc_implementation/shared/gcId.hpp hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.cpp hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp hotspot/src/share/vm/gc_implementation/shared/gcStats.cpp hotspot/src/share/vm/gc_implementation/shared/gcStats.hpp hotspot/src/share/vm/gc_implementation/shared/gcTimer.cpp hotspot/src/share/vm/gc_implementation/shared/gcTimer.hpp hotspot/src/share/vm/gc_implementation/shared/gcTrace.cpp hotspot/src/share/vm/gc_implementation/shared/gcTrace.hpp hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.cpp hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.hpp hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp hotspot/src/share/vm/gc_implementation/shared/gcWhen.hpp hotspot/src/share/vm/gc_implementation/shared/generationCounters.cpp hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.cpp hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp hotspot/src/share/vm/gc_implementation/shared/immutableSpace.cpp hotspot/src/share/vm/gc_implementation/shared/immutableSpace.hpp hotspot/src/share/vm/gc_implementation/shared/isGCActiveMark.hpp hotspot/src/share/vm/gc_implementation/shared/liveRange.hpp hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.hpp hotspot/src/share/vm/gc_implementation/shared/mutableSpace.cpp hotspot/src/share/vm/gc_implementation/shared/mutableSpace.hpp hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.hpp hotspot/src/share/vm/gc_implementation/shared/plab.cpp hotspot/src/share/vm/gc_implementation/shared/plab.hpp hotspot/src/share/vm/gc_implementation/shared/plab.inline.hpp hotspot/src/share/vm/gc_implementation/shared/spaceCounters.cpp hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.cpp hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.hpp hotspot/src/share/vm/gc_implementation/shared/suspendibleThreadSet.cpp hotspot/src/share/vm/gc_implementation/shared/suspendibleThreadSet.hpp hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.hpp hotspot/src/share/vm/gc_interface/allocTracer.cpp hotspot/src/share/vm/gc_interface/allocTracer.hpp hotspot/src/share/vm/gc_interface/collectedHeap.cpp hotspot/src/share/vm/gc_interface/collectedHeap.hpp hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp hotspot/src/share/vm/gc_interface/gcCause.cpp hotspot/src/share/vm/gc_interface/gcCause.hpp hotspot/src/share/vm/gc_interface/gcName.hpp hotspot/src/share/vm/memory/barrierSet.cpp hotspot/src/share/vm/memory/barrierSet.hpp hotspot/src/share/vm/memory/barrierSet.inline.hpp hotspot/src/share/vm/memory/blockOffsetTable.cpp hotspot/src/share/vm/memory/blockOffsetTable.hpp hotspot/src/share/vm/memory/blockOffsetTable.inline.hpp hotspot/src/share/vm/memory/cardGeneration.cpp hotspot/src/share/vm/memory/cardGeneration.hpp hotspot/src/share/vm/memory/cardGeneration.inline.hpp hotspot/src/share/vm/memory/cardTableModRefBS.cpp hotspot/src/share/vm/memory/cardTableModRefBS.hpp hotspot/src/share/vm/memory/cardTableModRefBS.inline.hpp hotspot/src/share/vm/memory/cardTableRS.cpp hotspot/src/share/vm/memory/cardTableRS.hpp hotspot/src/share/vm/memory/collectorPolicy.cpp hotspot/src/share/vm/memory/collectorPolicy.hpp hotspot/src/share/vm/memory/defNewGeneration.cpp hotspot/src/share/vm/memory/defNewGeneration.hpp hotspot/src/share/vm/memory/defNewGeneration.inline.hpp hotspot/src/share/vm/memory/gcLocker.cpp hotspot/src/share/vm/memory/gcLocker.hpp hotspot/src/share/vm/memory/gcLocker.inline.hpp hotspot/src/share/vm/memory/genCollectedHeap.cpp hotspot/src/share/vm/memory/genCollectedHeap.hpp hotspot/src/share/vm/memory/genMarkSweep.cpp hotspot/src/share/vm/memory/genMarkSweep.hpp hotspot/src/share/vm/memory/genOopClosures.cpp hotspot/src/share/vm/memory/genOopClosures.hpp hotspot/src/share/vm/memory/genOopClosures.inline.hpp hotspot/src/share/vm/memory/genRemSet.cpp hotspot/src/share/vm/memory/genRemSet.hpp hotspot/src/share/vm/memory/genRemSet.inline.hpp hotspot/src/share/vm/memory/generation.cpp hotspot/src/share/vm/memory/generation.hpp hotspot/src/share/vm/memory/generationSpec.cpp hotspot/src/share/vm/memory/generationSpec.hpp hotspot/src/share/vm/memory/modRefBarrierSet.hpp hotspot/src/share/vm/memory/referencePolicy.cpp hotspot/src/share/vm/memory/referencePolicy.hpp hotspot/src/share/vm/memory/referenceProcessor.cpp hotspot/src/share/vm/memory/referenceProcessor.hpp hotspot/src/share/vm/memory/referenceProcessorStats.hpp hotspot/src/share/vm/memory/space.cpp hotspot/src/share/vm/memory/space.hpp hotspot/src/share/vm/memory/space.inline.hpp hotspot/src/share/vm/memory/specialized_oop_closures.hpp hotspot/src/share/vm/memory/strongRootsScope.cpp hotspot/src/share/vm/memory/strongRootsScope.hpp hotspot/src/share/vm/memory/tenuredGeneration.cpp hotspot/src/share/vm/memory/tenuredGeneration.hpp hotspot/src/share/vm/memory/tenuredGeneration.inline.hpp hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp hotspot/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp hotspot/src/share/vm/memory/watermark.hpp hotspot/src/share/vm/utilities/taskqueue.cpp hotspot/src/share/vm/utilities/taskqueue.hpp hotspot/src/share/vm/utilities/taskqueue.inline.hpp hotspot/src/share/vm/utilities/workgroup.cpp hotspot/src/share/vm/utilities/workgroup.hpp hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp hotspot/test/gc/concurrentMarkSweep/DisableResizePLAB.java hotspot/test/gc/concurrentMarkSweep/GuardShrinkWarning.java hotspot/test/gc/defnew/HeapChangeLogging.java hotspot/test/gc/parallelScavenge/AdaptiveGCBoundary.java hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java jdk/make/gendata/Gendata-jdk.dev.gmk jdk/src/bsd/doc/man/ja/native2ascii.1 jdk/src/bsd/doc/man/native2ascii.1 jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/package.html jdk/src/java.base/share/classes/com/sun/net/ssl/package.html jdk/src/java.base/share/classes/java/io/package.html jdk/src/java.base/share/classes/java/lang/ref/package.html jdk/src/java.base/share/classes/java/nio/channels/spi/package.html jdk/src/java.base/share/classes/java/nio/charset/package.html jdk/src/java.base/share/classes/java/nio/charset/spi/package.html jdk/src/java.base/share/classes/java/nio/package.html jdk/src/java.base/share/classes/java/text/package.html jdk/src/java.base/share/classes/java/text/spi/package.html jdk/src/java.base/share/classes/java/util/jar/package.html jdk/src/java.base/share/classes/java/util/package.html jdk/src/java.base/share/classes/java/util/regex/package.html jdk/src/java.base/share/classes/java/util/spi/package.html jdk/src/java.base/share/classes/javax/crypto/interfaces/package.html jdk/src/java.base/share/classes/javax/crypto/package.html jdk/src/java.base/share/classes/javax/crypto/spec/package.html jdk/src/java.base/share/classes/javax/net/package.html jdk/src/java.base/share/classes/javax/net/ssl/package.html jdk/src/java.base/share/classes/sun/reflect/package.html jdk/src/jdk.dev/share/classes/sun/tools/native2ascii/A2NFilter.java jdk/src/jdk.dev/share/classes/sun/tools/native2ascii/Main.java jdk/src/jdk.dev/share/classes/sun/tools/native2ascii/N2AFilter.java jdk/src/jdk.dev/share/classes/sun/tools/native2ascii/resources/MsgNative2ascii.java jdk/test/sun/nio/cs/Test4200310.sh jdk/test/sun/tools/jhat/hprof.bin jdk/test/sun/tools/jhat/jmap.bin jdk/test/sun/tools/jhat/minimal.bin jdk/test/sun/tools/native2ascii/A2N_4630463 jdk/test/sun/tools/native2ascii/A2N_4630463.expected jdk/test/sun/tools/native2ascii/A2N_4630971 jdk/test/sun/tools/native2ascii/A2N_4701617 jdk/test/sun/tools/native2ascii/A2N_4701617.expected jdk/test/sun/tools/native2ascii/A2N_6247817 jdk/test/sun/tools/native2ascii/N2A_4636448 jdk/test/sun/tools/native2ascii/N2A_4636448.expected jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh jdk/test/sun/tools/native2ascii/NativeErrors.java jdk/test/sun/tools/native2ascii/Permission.java jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.java jdk/test/sun/tools/native2ascii/test1 jdk/test/sun/tools/native2ascii/test3 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSObjectListAdapter.java
diffstat 1651 files changed, 127866 insertions(+), 125700 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags-top-repo	Thu May 28 16:54:56 2015 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 20:36:12 2017 +0200
@@ -308,3 +308,4 @@
 0b32ed628fa60e4ab99fb0b5866d648e16231f17 jdk9-b63
 82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64
 7c31f9d7b932f7924f1258d52885b1c7c3e078c2 jdk9-b65
+dc6e8336f51bb6b67b7245766179eab5ca7720b4 jdk9-b66
--- a/common/autoconf/flags.m4	Thu May 28 16:54:56 2015 -0700
+++ b/common/autoconf/flags.m4	Wed Jul 05 20:36:12 2017 +0200
@@ -559,6 +559,7 @@
         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
         -DWIN32_LEAN_AND_MEAN \
         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
         -DWIN32 -DIAL"
     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
--- a/common/autoconf/generated-configure.sh	Thu May 28 16:54:56 2015 -0700
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 20:36:12 2017 +0200
@@ -4366,7 +4366,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1431429776
+DATE_WHEN_GENERATED=1432629750
 
 ###############################################################################
 #
@@ -42071,6 +42071,7 @@
         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
         -DWIN32_LEAN_AND_MEAN \
         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
         -DWIN32 -DIAL"
     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
--- a/common/bin/compare_exceptions.sh.incl	Thu May 28 16:54:56 2015 -0700
+++ b/common/bin/compare_exceptions.sh.incl	Wed Jul 05 20:36:12 2017 +0200
@@ -94,7 +94,6 @@
 ./bin/jstat
 ./bin/jstatd
 ./bin/keytool
-./bin/native2ascii
 ./bin/orbd
 ./bin/pack200
 ./bin/policytool
@@ -173,7 +172,6 @@
 ./bin/jstat
 ./bin/jstatd
 ./bin/keytool
-./bin/native2ascii
 ./bin/orbd
 ./bin/pack200
 ./bin/policytool
@@ -293,7 +291,6 @@
 ./bin/jstat
 ./bin/jstatd
 ./bin/keytool
-./bin/native2ascii
 ./bin/orbd
 ./bin/pack200
 ./bin/policytool
@@ -428,7 +425,6 @@
 ./bin/jstat
 ./bin/jstatd
 ./bin/keytool
-./bin/native2ascii
 ./bin/orbd
 ./bin/pack200
 ./bin/policytool
@@ -509,7 +505,6 @@
 ./bin/kinit.exe
 ./bin/klist.exe
 ./bin/ktab.exe
-./bin/native2ascii.exe
 ./bin/orbd.exe
 ./bin/pack200.exe
 ./bin/policytool.exe
@@ -585,7 +580,6 @@
 ./bin/jstat
 ./bin/jstatd
 ./bin/keytool
-./bin/native2ascii
 ./bin/orbd
 ./bin/pack200
 ./bin/policytool
--- a/common/bin/unshuffle_list.txt	Thu May 28 16:54:56 2015 -0700
+++ b/common/bin/unshuffle_list.txt	Wed Jul 05 20:36:12 2017 +0200
@@ -1301,8 +1301,6 @@
 jdk/src/jdk.deploy.osx/macosx/native/libosx/Dispatch.m : jdk/src/macosx/native/com/apple/concurrent/Dispatch.m
 jdk/src/jdk.deploy.osx/macosx/native/libosx/JavaAppLauncher.m : jdk/src/macosx/native/apple/launcher/JavaAppLauncher.m
 jdk/src/jdk.deploy.osx/macosx/native/libosx/KeystoreImpl.m : jdk/src/macosx/native/apple/security/KeystoreImpl.m
-jdk/src/jdk.dev/share/classes/com/sun/tools/hat : jdk/src/share/classes/com/sun/tools/hat
-jdk/src/jdk.dev/share/classes/sun/tools/native2ascii : jdk/src/share/classes/sun/tools/native2ascii
 jdk/src/jdk.hprof.agent/share/classes/com/sun/demo/jvmti/hprof : jdk/src/share/classes/com/sun/demo/jvmti/hprof
 jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver : jdk/src/share/classes/com/sun/net/httpserver
 jdk/src/jdk.httpserver/share/classes/sun/net/httpserver : jdk/src/share/classes/sun/net/httpserver
@@ -1487,16 +1485,16 @@
 langtools/src/java.compiler/share/classes/javax/lang/model : langtools/src/share/classes/javax/lang/model
 langtools/src/java.compiler/share/classes/javax/tools : langtools/src/share/classes/javax/tools
 langtools/src/jdk.compiler/share/classes/com/sun/source : langtools/src/share/classes/com/sun/source
-langtools/src/jdk.compiler/share/classes/com/sun/tools/classfile : langtools/src/share/classes/com/sun/tools/classfile
 langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint : langtools/src/share/classes/com/sun/tools/doclint
 langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources : langtools/src/share/classes/com/sun/tools/doclint/resources
 langtools/src/jdk.compiler/share/classes/com/sun/tools/javac : langtools/src/share/classes/com/sun/tools/javac
 langtools/src/jdk.compiler/share/classes/com/sun/tools/javah : langtools/src/share/classes/com/sun/tools/javah
-langtools/src/jdk.compiler/share/classes/com/sun/tools/javap : langtools/src/share/classes/com/sun/tools/javap
 langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac : langtools/src/share/classes/com/sun/tools/sjavac
-langtools/src/jdk.dev/share/classes/com/sun/tools/jdeps : langtools/src/share/classes/com/sun/tools/jdeps
-langtools/src/jdk.dev/share/classes/com/sun/tools/jdeps/resources : langtools/src/share/classes/com/sun/tools/jdeps/resources
 langtools/src/jdk.javadoc/share/classes/com/sun/javadoc : langtools/src/share/classes/com/sun/javadoc
 langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets : langtools/src/share/classes/com/sun/tools/doclets
 langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc : langtools/src/share/classes/com/sun/tools/javadoc
+langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile : langtools/src/share/classes/com/sun/tools/classfile
+langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap : langtools/src/share/classes/com/sun/tools/javap
+langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps : langtools/src/share/classes/com/sun/tools/jdeps
+langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources : langtools/src/share/classes/com/sun/tools/jdeps/resources
 nashorn/src/jdk.scripting.nashorn/share/classes : nashorn/src
--- a/corba/.hgtags	Thu May 28 16:54:56 2015 -0700
+++ b/corba/.hgtags	Wed Jul 05 20:36:12 2017 +0200
@@ -308,3 +308,4 @@
 0acac6937de7a0868f8c6f88b7d036d780abeee6 jdk9-b63
 0a5e5a7c3539e8bde73d9fe55750e49a49cb8dac jdk9-b64
 afc1e295c4bf83f9a5dd539c29914edd4a754a3f jdk9-b65
+44ee68f7dbacab24a45115fd6a8ccdc7eb6e8f0b jdk9-b66
--- a/corba/src/java.corba/share/classes/org/omg/DynamicAny/package.html	Thu May 28 16:54:56 2015 -0700
+++ b/corba/src/java.corba/share/classes/org/omg/DynamicAny/package.html	Wed Jul 05 20:36:12 2017 +0200
@@ -25,7 +25,7 @@
  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.
- 
+
 -->
 
 </head>
@@ -40,97 +40,97 @@
 been compiled with the object implementation). As a result, the object receiving the 
 <code>any</code> does not have a portable method of using it.
 
-<P><code>DynAny</code>s enable traversal of the data value associated with an 
-<code>any</code> at runtime, and extraction of the primitive constituents of the data value. 
-This is especially helpful for writing powerful generic servers (bridges, event channels 
-supporting filtering).  Similarly, this facility enables the construction of an 
-<code>any</code> at runtime, without having static knowledge of its type. This is especially 
+<P><code>DynAny</code>s enable traversal of the data value associated with an
+<code>any</code> at runtime, and extraction of the primitive constituents of the data value.
+This is especially helpful for writing powerful generic servers (bridges, event channels
+supporting filtering).  Similarly, this facility enables the construction of an
+<code>any</code> at runtime, without having static knowledge of its type. This is especially
 helpful for writing generic clients (bridges, browsers, debuggers, user interface tools).
 
-<P><code>Any</code> values can be dynamically interpreted (traversed) and constructed through  
-<tt>DynAny</tt> objects.  A <tt>DynAny</tt> object is associated with a data 
-value which corresponds to a copy of the value inserted into an <tt>Any</tt>.  A 
+<P><code>Any</code> values can be dynamically interpreted (traversed) and constructed through
+<tt>DynAny</tt> objects.  A <tt>DynAny</tt> object is associated with a data
+value which corresponds to a copy of the value inserted into an <tt>Any</tt>.  A
 <tt>DynAny</tt> object may be viewed as an ordered collection of component 
-<tt>DynAny</tt>s. For <tt>DynAny</tt>s representing a basic type, such as <code>long</code>, 
-or a type without components, such as an empty exception, the ordered collection of 
-components is empty. 
+<tt>DynAny</tt>s. For <tt>DynAny</tt>s representing a basic type, such as <code>long</code>,
+or a type without components, such as an empty exception, the ordered collection of
+components is empty.
 
-<P>Each <tt>DynAny</tt> object maintains the notion of a current position into its collection 
-of component <tt>DynAny</tt>s. The current position is identified by an index value that runs 
-from 0 to n-1, where <em>n</em> is the number of components.  The special index value -1 
+<P>Each <tt>DynAny</tt> object maintains the notion of a current position into its collection
+of component <tt>DynAny</tt>s. The current position is identified by an index value that runs
+from 0 to n-1, where <em>n</em> is the number of components.  The special index value -1
 indicates a current position that points nowhere.
  For values that cannot have a current position (such as an empty exception),
  the index value is fixed at -1.
- If a <code>DynAny</code> is initialized with a value that has components, the index is 
+ If a <code>DynAny</code> is initialized with a value that has components, the index is
 initialized to 0.
- After creation of an uninitialized <code>DynAny</code> (that is, a <code>DynAny</code> that 
+ After creation of an uninitialized <code>DynAny</code> (that is, a <code>DynAny</code> that
 has no value but a <code>TypeCode</code>
  that permits components), the current position depends on the type of value represented by
- the <code>DynAny</code>. (The current position is set to 0 or -1, depending on whether the 
+ the <code>DynAny</code>. (The current position is set to 0 or -1, depending on whether the
 new <code>DynAny</code>
  gets default values for its components.)
- 
- 
- <P>The iteration operations <code>rewind</code>, <code>seek</code>, and <code>next</code> 
+
+
+<P>The iteration operations <code>rewind</code>, <code>seek</code>, and <code>next</code>
 can be used to change the current position
- and the <code>current_component</code> operation returns the component at the current 
+ and the <code>current_component</code> operation returns the component at the current
 position.
- The <code>component_count</code> operation returns the number of components of a 
+ The <code>component_count</code> operation returns the number of components of a
 <code>DynAny</code>.
- Collectively, these operations enable iteration over the components of a 
+ Collectively, these operations enable iteration over the components of a
 <code>DynAny</code>, for example,
  to (recursively) examine its contents.
  
  
- <P>A constructed <code>DynAny</code> object is a <code>DynAny</code> object associated with 
+ <P>A constructed <code>DynAny</code> object is a <code>DynAny</code> object associated with
 a constructed type.
- There is a different interface, inheriting from the <code>DynAny</code> interface, 
+ There is a different interface, inheriting from the <code>DynAny</code> interface,
 associated with
  each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array,
- exception, and value type).  A constructed <code>DynAny</code> object exports operations 
+ exception, and value type).  A constructed <code>DynAny</code> object exports operations
 that enable the creation of new <code>DynAny</code> objects,
  each of them associated with a component of the constructed data value.
- As an example, a <code>DynStruct</code> is associated with a <code>struct</code> value. This 
+ As an example, a <code>DynStruct</code> is associated with a <code>struct</code> value. This
 means that the <code>DynStruct</code>
  may be seen as owning an ordered collection of components, one for each structure member.
- The <code>DynStruct</code> object exports operations that enable the creation of new 
+ The <code>DynStruct</code> object exports operations that enable the creation of new
 <code>DynAny</code> objects,
  each of them associated with a member of the <code>struct</code>.
- 
- 
- <P>If a <code>DynAny</code> object has been obtained from another (constructed) 
+
+
+<P>If a <code>DynAny</code> object has been obtained from another (constructed)
 <code>DynAny</code> object,
- such as a <code>DynAny</code> representing a structure member that was created from a 
+ such as a <code>DynAny</code> representing a structure member that was created from a
 <code>DynStruct</code>,
  the member <code>DynAny</code> is logically contained in the <code>DynStruct</code>.
- Calling an <code>insert</code> or <code>get</code> operation leaves the current position 
+ Calling an <code>insert</code> or <code>get</code> operation leaves the current position
 unchanged.
- Destroying a top-level <code>DynAny</code> object (one that was not obtained as a component 
+ Destroying a top-level <code>DynAny</code> object (one that was not obtained as a component
 of another <code>DynAny</code>)
  also destroys any component <code>DynAny</code> objects obtained from it.
  Destroying a non-top level <code>DynAny</code> object does nothing.
- Invoking operations on a destroyed top-level <code>DynAny</code> or any of its descendants 
+ Invoking operations on a destroyed top-level <code>DynAny</code> or any of its descendants
 raises OBJECT_NOT_EXIST.
- If the programmer wants to destroy a <code>DynAny</code> object but still wants to 
+ If the programmer wants to destroy a <code>DynAny</code> object but still wants to
 manipulate some component
- of the data value associated with it, then he or she should first create a 
+ of the data value associated with it, then he or she should first create a
 <code>DynAny</code> for the component
  and, after that, make a copy of the created <code>DynAny</code> object.
- 
- 
- <P>The behavior of <code>DynAny</code> objects has been defined in order to enable efficient 
+
+
+<P>The behavior of <code>DynAny</code> objects has been defined in order to enable efficient
 implementations
- in terms of allocated memory space and speed of access. <code>DynAny</code> objects are 
+in terms of allocated memory space and speed of access. <code>DynAny</code> objects are
 intended to be used
- for traversing values extracted from <code>any</code>s or constructing values of 
+for traversing values extracted from <code>any</code>s or constructing values of
 <code>any</code>s at runtime.
- Their use for other purposes is not recommended.
- 
- 
- 
+Their use for other purposes is not recommended.
+
+
+
  <H2>Handling DynAny objects</H2>
- 
- <P><code>Insert</code> and <code>get</code> operations are necessary to handle basic 
+
+<P><code>Insert</code> and <code>get</code> operations are necessary to handle basic 
 <code>DynAny</code> objects
  but are also helpful to handle constructed <code>DynAny</code> objects.
  Inserting a basic data type value into a constructed <code>DynAny</code> object
@@ -145,9 +145,8 @@
  the <code>TypeCode</code> contained in the <code>DynAny</code> or, if the 
 <code>DynAny</code> has components, is equivalent to the <code>TypeCode</code>
  of the <code>DynAny</code> at the current position.
- 
+
  <P>Basic operations include:
- <P>
  <UL>
  	<LI>insert_boolean, get_boolean
  	<LI>insert_char, get_char
@@ -181,28 +180,28 @@
  	<LI>get_boxed_value
  	<LI>get_boxed_value_as_dyn_any
  </UL>
- 
- 
- <P><code>DynAny</code> and <code>DynAnyFactory</code> objects are intended to be local to 
+
+
+ <P><code>DynAny</code> and <code>DynAnyFactory</code> objects are intended to be local to
 the process in which they are
- created and used. This means that references to <code>DynAny</code> and 
+ created and used. This means that references to <code>DynAny</code> and
 <code>DynAnyFactory</code> objects cannot be exported
  to other processes, or externalized with <code>ORB.object_to_string()</code>.
- If any attempt is made to do so, the offending operation will raise a MARSHAL system 
+ If any attempt is made to do so, the offending operation will raise a MARSHAL system
 exception.
- Since their interfaces are specified in IDL, <code>DynAny</code> objects export operations 
+ Since their interfaces are specified in IDL, <code>DynAny</code> objects export operations
 defined in the standard
- <code>org.omg.CORBA.Object</code> interface. However, any attempt to invoke operations 
+ <code>org.omg.CORBA.Object</code> interface. However, any attempt to invoke operations
 exported through the <code>Object</code>
  interface may raise the standard NO_IMPLEMENT exception.
- An attempt to use a <code>DynAny</code> object with the DII may raise the NO_IMPLEMENT 
+ An attempt to use a <code>DynAny</code> object with the DII may raise the NO_IMPLEMENT
 exception.
 
 <H3>Package Specification</H3>
 
-<P>For a precise list of supported sections of official specifications with which 
-the Java[tm] Platform, Standard Edition 6 ORB complies, see <A 
-HREF="../CORBA/doc-files/compliance.html">Official Specifications for CORBA 
+<P>For a precise list of supported sections of official specifications with which
+the Java[tm] Platform, Standard Edition 6 ORB complies, see <A
+HREF="../CORBA/doc-files/compliance.html">Official Specifications for CORBA
 support in Java[tm] SE 6</A>.
 
 @since 1.4
--- a/hotspot/.hgtags	Thu May 28 16:54:56 2015 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 20:36:12 2017 +0200
@@ -468,3 +468,4 @@
 2ac9b6b36689b50d1562627067c92d51781b5684 jdk9-b63
 bf92b8db249cdfa5651ef954b6c0743a7e0ea4cd jdk9-b64
 e7ae94c4f35e940ea423fc1dd260435df34a77c0 jdk9-b65
+197e94e0dacddd16816f101d24fc0442ab518326 jdk9-b66
--- a/hotspot/agent/make/Makefile	Thu May 28 16:54:56 2015 -0700
+++ b/hotspot/agent/make/Makefile	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Thu May 28 16:54:56 2015 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapPair.java	Thu May 28 16:54:56 2015 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapPair.java	Wed Jul 05 20:36:12 2017 +0200
@@ -71,4 +71,8 @@
     offsetField = type.getCIntegerField("_oopmap_offset");
     classSize = type.getSize();
   }
+
+  public String toString() {
+    return "Pair{pc_offset = " + getPC() + ", data_offset = " + getOffset() + "}";
+  }
 }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapSet.java	Thu May 28 16:54:56 2015 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/compiler/ImmutableOopMapSet.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/AdaptiveFreeList.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CMSBitMap.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CMSCollector.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/ConcurrentMarkSweepGeneration.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/LinearAllocBlock.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/ParNewGeneration.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1MonitoringSupport.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetCount.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ImmutableSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/MutableSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSOldGen.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSYoungGen.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ParallelScavengeHeap.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/serial/DefNewGeneration.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CardGeneration.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeap.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CompactibleSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/ContiguousSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/G1YCType.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCName.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCWhen.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenCollectedHeap.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/Generation.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationFactory.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationIsInClosure.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GenerationSpec.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/OffsetTableContigSpace.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/Space.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/SpaceClosure.java	Wed Jul 05 20:36:12 2017 +0200
@@ -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
+