changeset 30764:fec48bf5a827

8079792: GC directory structure cleanup Reviewed-by: brutisso, stefank, david
author pliden
date Wed, 13 May 2015 15:16:06 +0200
parents e45861098f5a
children 32398da8ba8f
files hotspot/agent/make/Makefile hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1MonitoringSupport.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetCount.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSOldGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSYoungGen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ParallelScavengeHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/G1YCType.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCName.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCWhen.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/ImmutableSpace.java hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/MutableSpace.java 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/GenCollectedHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ReferenceType.java hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/LivenessAnalysis.java hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/MarkBits.java hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java hotspot/make/aix/makefiles/vm.make hotspot/make/bsd/makefiles/vm.make hotspot/make/excludeSrc.make hotspot/make/linux/makefiles/vm.make hotspot/make/pic.make hotspot/make/sa.files hotspot/make/solaris/makefiles/vm.make hotspot/make/windows/create_obj_files.sh hotspot/make/windows/makefiles/vm.make hotspot/src/cpu/aarch64/vm/aarch64.ad hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp hotspot/src/cpu/aarch64/vm/c1_MacroAssembler_aarch64.cpp hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp hotspot/src/cpu/aarch64/vm/icBuffer_aarch64.cpp hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp hotspot/src/cpu/ppc/vm/assembler_ppc.cpp hotspot/src/cpu/ppc/vm/icBuffer_ppc.cpp hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp hotspot/src/cpu/sparc/vm/icBuffer_sparc.cpp hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp hotspot/src/cpu/x86/vm/assembler_x86.cpp hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp hotspot/src/cpu/x86/vm/icBuffer_x86.cpp hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp hotspot/src/cpu/zero/vm/assembler_zero.cpp hotspot/src/cpu/zero/vm/icBuffer_zero.cpp hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp hotspot/src/share/vm/adlc/main.cpp hotspot/src/share/vm/asm/codeBuffer.cpp hotspot/src/share/vm/c1/c1_LIRGenerator.cpp hotspot/src/share/vm/c1/c1_Runtime1.cpp hotspot/src/share/vm/ci/ciBaseObject.cpp hotspot/src/share/vm/ci/ciEnv.cpp hotspot/src/share/vm/ci/ciField.cpp hotspot/src/share/vm/ci/ciMetadata.cpp hotspot/src/share/vm/ci/ciObject.cpp hotspot/src/share/vm/ci/ciObjectFactory.cpp hotspot/src/share/vm/classfile/classFileParser.cpp hotspot/src/share/vm/classfile/classLoader.cpp hotspot/src/share/vm/classfile/classLoaderData.cpp hotspot/src/share/vm/classfile/stringTable.cpp hotspot/src/share/vm/classfile/symbolTable.cpp hotspot/src/share/vm/classfile/systemDictionary.cpp hotspot/src/share/vm/classfile/verifier.hpp hotspot/src/share/vm/code/codeCache.cpp hotspot/src/share/vm/code/icBuffer.cpp hotspot/src/share/vm/compiler/disassembler.cpp hotspot/src/share/vm/compiler/oopMap.cpp hotspot/src/share/vm/gc/cms/adaptiveFreeList.cpp hotspot/src/share/vm/gc/cms/adaptiveFreeList.hpp hotspot/src/share/vm/gc/cms/allocationStats.cpp hotspot/src/share/vm/gc/cms/allocationStats.hpp hotspot/src/share/vm/gc/cms/cmsCollectorPolicy.cpp hotspot/src/share/vm/gc/cms/cmsCollectorPolicy.hpp hotspot/src/share/vm/gc/cms/cmsLockVerifier.cpp hotspot/src/share/vm/gc/cms/cmsLockVerifier.hpp hotspot/src/share/vm/gc/cms/cmsOopClosures.cpp hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp hotspot/src/share/vm/gc/cms/cmsOopClosures.inline.hpp hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.hpp hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.inline.hpp hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.cpp hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.hpp hotspot/src/share/vm/gc/cms/freeChunk.cpp hotspot/src/share/vm/gc/cms/freeChunk.hpp hotspot/src/share/vm/gc/cms/gSpaceCounters.cpp hotspot/src/share/vm/gc/cms/gSpaceCounters.hpp hotspot/src/share/vm/gc/cms/parCardTableModRefBS.cpp hotspot/src/share/vm/gc/cms/parNewGeneration.cpp hotspot/src/share/vm/gc/cms/parNewGeneration.hpp hotspot/src/share/vm/gc/cms/parOopClosures.cpp hotspot/src/share/vm/gc/cms/parOopClosures.hpp hotspot/src/share/vm/gc/cms/parOopClosures.inline.hpp hotspot/src/share/vm/gc/cms/promotionInfo.cpp hotspot/src/share/vm/gc/cms/promotionInfo.hpp hotspot/src/share/vm/gc/cms/vmCMSOperations.cpp hotspot/src/share/vm/gc/cms/vmCMSOperations.hpp hotspot/src/share/vm/gc/cms/vmStructs_cms.hpp hotspot/src/share/vm/gc/cms/vmStructs_parNew.hpp hotspot/src/share/vm/gc/cms/yieldingWorkgroup.cpp hotspot/src/share/vm/gc/cms/yieldingWorkgroup.hpp hotspot/src/share/vm/gc/g1/bufferingOopClosure.cpp hotspot/src/share/vm/gc/g1/bufferingOopClosure.hpp hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp hotspot/src/share/vm/gc/g1/concurrentG1Refine.hpp hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.hpp hotspot/src/share/vm/gc/g1/concurrentMark.cpp hotspot/src/share/vm/gc/g1/concurrentMark.hpp hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp hotspot/src/share/vm/gc/g1/concurrentMarkThread.cpp hotspot/src/share/vm/gc/g1/concurrentMarkThread.hpp hotspot/src/share/vm/gc/g1/concurrentMarkThread.inline.hpp hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp hotspot/src/share/vm/gc/g1/evacuationInfo.hpp hotspot/src/share/vm/gc/g1/g1AllocRegion.cpp hotspot/src/share/vm/gc/g1/g1AllocRegion.hpp hotspot/src/share/vm/gc/g1/g1AllocRegion.inline.hpp hotspot/src/share/vm/gc/g1/g1AllocationContext.hpp hotspot/src/share/vm/gc/g1/g1Allocator.cpp hotspot/src/share/vm/gc/g1/g1Allocator.hpp hotspot/src/share/vm/gc/g1/g1Allocator_ext.cpp hotspot/src/share/vm/gc/g1/g1BiasedArray.cpp hotspot/src/share/vm/gc/g1/g1BiasedArray.hpp hotspot/src/share/vm/gc/g1/g1BlockOffsetTable.cpp hotspot/src/share/vm/gc/g1/g1BlockOffsetTable.hpp hotspot/src/share/vm/gc/g1/g1BlockOffsetTable.inline.hpp hotspot/src/share/vm/gc/g1/g1CardCounts.cpp hotspot/src/share/vm/gc/g1/g1CardCounts.hpp hotspot/src/share/vm/gc/g1/g1CodeCacheRemSet.cpp hotspot/src/share/vm/gc/g1/g1CodeCacheRemSet.hpp hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp hotspot/src/share/vm/gc/g1/g1CollectedHeap_ext.cpp hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp hotspot/src/share/vm/gc/g1/g1CollectorPolicy_ext.hpp hotspot/src/share/vm/gc/g1/g1ErgoVerbose.cpp hotspot/src/share/vm/gc/g1/g1ErgoVerbose.hpp hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp hotspot/src/share/vm/gc/g1/g1EvacFailure.hpp hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.hpp hotspot/src/share/vm/gc/g1/g1HRPrinter.cpp hotspot/src/share/vm/gc/g1/g1HRPrinter.hpp hotspot/src/share/vm/gc/g1/g1HotCardCache.cpp hotspot/src/share/vm/gc/g1/g1HotCardCache.hpp hotspot/src/share/vm/gc/g1/g1InCSetState.hpp hotspot/src/share/vm/gc/g1/g1Log.cpp hotspot/src/share/vm/gc/g1/g1Log.hpp hotspot/src/share/vm/gc/g1/g1MMUTracker.cpp hotspot/src/share/vm/gc/g1/g1MMUTracker.hpp hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp hotspot/src/share/vm/gc/g1/g1MarkSweep.hpp hotspot/src/share/vm/gc/g1/g1MarkSweep_ext.cpp hotspot/src/share/vm/gc/g1/g1MonitoringSupport.cpp hotspot/src/share/vm/gc/g1/g1MonitoringSupport.hpp hotspot/src/share/vm/gc/g1/g1OopClosures.cpp hotspot/src/share/vm/gc/g1/g1OopClosures.hpp hotspot/src/share/vm/gc/g1/g1OopClosures.inline.hpp hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp hotspot/src/share/vm/gc/g1/g1ParScanThreadState.cpp hotspot/src/share/vm/gc/g1/g1ParScanThreadState.hpp hotspot/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp hotspot/src/share/vm/gc/g1/g1RegionToSpaceMapper.cpp hotspot/src/share/vm/gc/g1/g1RegionToSpaceMapper.hpp hotspot/src/share/vm/gc/g1/g1RemSet.cpp hotspot/src/share/vm/gc/g1/g1RemSet.hpp hotspot/src/share/vm/gc/g1/g1RemSet.inline.hpp hotspot/src/share/vm/gc/g1/g1RemSetSummary.cpp hotspot/src/share/vm/gc/g1/g1RemSetSummary.hpp hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp hotspot/src/share/vm/gc/g1/g1RootProcessor.hpp hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.hpp hotspot/src/share/vm/gc/g1/g1StringDedup.cpp hotspot/src/share/vm/gc/g1/g1StringDedup.hpp hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp hotspot/src/share/vm/gc/g1/g1StringDedupQueue.hpp hotspot/src/share/vm/gc/g1/g1StringDedupStat.cpp hotspot/src/share/vm/gc/g1/g1StringDedupStat.hpp hotspot/src/share/vm/gc/g1/g1StringDedupTable.cpp hotspot/src/share/vm/gc/g1/g1StringDedupTable.hpp hotspot/src/share/vm/gc/g1/g1StringDedupThread.cpp hotspot/src/share/vm/gc/g1/g1StringDedupThread.hpp hotspot/src/share/vm/gc/g1/g1YCTypes.hpp hotspot/src/share/vm/gc/g1/g1_globals.cpp hotspot/src/share/vm/gc/g1/g1_globals.hpp hotspot/src/share/vm/gc/g1/g1_specialized_oop_closures.hpp hotspot/src/share/vm/gc/g1/hSpaceCounters.cpp hotspot/src/share/vm/gc/g1/hSpaceCounters.hpp hotspot/src/share/vm/gc/g1/heapRegion.cpp hotspot/src/share/vm/gc/g1/heapRegion.hpp hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp hotspot/src/share/vm/gc/g1/heapRegionBounds.hpp hotspot/src/share/vm/gc/g1/heapRegionBounds.inline.hpp hotspot/src/share/vm/gc/g1/heapRegionManager.cpp hotspot/src/share/vm/gc/g1/heapRegionManager.hpp hotspot/src/share/vm/gc/g1/heapRegionManager.inline.hpp hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp hotspot/src/share/vm/gc/g1/heapRegionSet.cpp hotspot/src/share/vm/gc/g1/heapRegionSet.hpp hotspot/src/share/vm/gc/g1/heapRegionSet.inline.hpp hotspot/src/share/vm/gc/g1/heapRegionType.cpp hotspot/src/share/vm/gc/g1/heapRegionType.hpp hotspot/src/share/vm/gc/g1/ptrQueue.cpp hotspot/src/share/vm/gc/g1/ptrQueue.hpp hotspot/src/share/vm/gc/g1/satbQueue.cpp hotspot/src/share/vm/gc/g1/satbQueue.hpp hotspot/src/share/vm/gc/g1/sparsePRT.cpp hotspot/src/share/vm/gc/g1/sparsePRT.hpp hotspot/src/share/vm/gc/g1/survRateGroup.cpp hotspot/src/share/vm/gc/g1/survRateGroup.hpp hotspot/src/share/vm/gc/g1/suspendibleThreadSet.cpp hotspot/src/share/vm/gc/g1/suspendibleThreadSet.hpp hotspot/src/share/vm/gc/g1/vmStructs_g1.hpp hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp hotspot/src/share/vm/gc/g1/vm_operations_g1.hpp hotspot/src/share/vm/gc/parallel/adjoiningGenerations.cpp hotspot/src/share/vm/gc/parallel/adjoiningGenerations.hpp hotspot/src/share/vm/gc/parallel/adjoiningVirtualSpaces.cpp hotspot/src/share/vm/gc/parallel/adjoiningVirtualSpaces.hpp hotspot/src/share/vm/gc/parallel/asPSOldGen.cpp hotspot/src/share/vm/gc/parallel/asPSOldGen.hpp hotspot/src/share/vm/gc/parallel/asPSYoungGen.cpp hotspot/src/share/vm/gc/parallel/asPSYoungGen.hpp hotspot/src/share/vm/gc/parallel/cardTableExtension.cpp hotspot/src/share/vm/gc/parallel/cardTableExtension.hpp hotspot/src/share/vm/gc/parallel/gcAdaptivePolicyCounters.cpp hotspot/src/share/vm/gc/parallel/gcAdaptivePolicyCounters.hpp hotspot/src/share/vm/gc/parallel/gcTaskManager.cpp hotspot/src/share/vm/gc/parallel/gcTaskManager.hpp hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp hotspot/src/share/vm/gc/parallel/generationSizer.cpp hotspot/src/share/vm/gc/parallel/generationSizer.hpp hotspot/src/share/vm/gc/parallel/immutableSpace.cpp hotspot/src/share/vm/gc/parallel/immutableSpace.hpp hotspot/src/share/vm/gc/parallel/mutableNUMASpace.cpp hotspot/src/share/vm/gc/parallel/mutableNUMASpace.hpp hotspot/src/share/vm/gc/parallel/mutableSpace.cpp hotspot/src/share/vm/gc/parallel/mutableSpace.hpp hotspot/src/share/vm/gc/parallel/objectStartArray.cpp hotspot/src/share/vm/gc/parallel/objectStartArray.hpp hotspot/src/share/vm/gc/parallel/parMarkBitMap.cpp hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp hotspot/src/share/vm/gc/parallel/parallelScavengeHeap.cpp hotspot/src/share/vm/gc/parallel/parallelScavengeHeap.hpp hotspot/src/share/vm/gc/parallel/parallelScavengeHeap.inline.hpp hotspot/src/share/vm/gc/parallel/pcTasks.cpp hotspot/src/share/vm/gc/parallel/pcTasks.hpp hotspot/src/share/vm/gc/parallel/psAdaptiveSizePolicy.cpp hotspot/src/share/vm/gc/parallel/psAdaptiveSizePolicy.hpp hotspot/src/share/vm/gc/parallel/psCompactionManager.cpp hotspot/src/share/vm/gc/parallel/psCompactionManager.hpp hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp hotspot/src/share/vm/gc/parallel/psGCAdaptivePolicyCounters.cpp hotspot/src/share/vm/gc/parallel/psGCAdaptivePolicyCounters.hpp hotspot/src/share/vm/gc/parallel/psGenerationCounters.cpp hotspot/src/share/vm/gc/parallel/psGenerationCounters.hpp hotspot/src/share/vm/gc/parallel/psMarkSweep.cpp hotspot/src/share/vm/gc/parallel/psMarkSweep.hpp hotspot/src/share/vm/gc/parallel/psMarkSweepDecorator.cpp hotspot/src/share/vm/gc/parallel/psMarkSweepDecorator.hpp hotspot/src/share/vm/gc/parallel/psOldGen.cpp hotspot/src/share/vm/gc/parallel/psOldGen.hpp hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp hotspot/src/share/vm/gc/parallel/psParallelCompact.hpp hotspot/src/share/vm/gc/parallel/psParallelCompact.inline.hpp hotspot/src/share/vm/gc/parallel/psPromotionLAB.cpp hotspot/src/share/vm/gc/parallel/psPromotionLAB.hpp hotspot/src/share/vm/gc/parallel/psPromotionLAB.inline.hpp hotspot/src/share/vm/gc/parallel/psPromotionManager.cpp hotspot/src/share/vm/gc/parallel/psPromotionManager.hpp hotspot/src/share/vm/gc/parallel/psPromotionManager.inline.hpp hotspot/src/share/vm/gc/parallel/psScavenge.cpp hotspot/src/share/vm/gc/parallel/psScavenge.hpp hotspot/src/share/vm/gc/parallel/psScavenge.inline.hpp hotspot/src/share/vm/gc/parallel/psTasks.cpp hotspot/src/share/vm/gc/parallel/psTasks.hpp hotspot/src/share/vm/gc/parallel/psVirtualspace.cpp hotspot/src/share/vm/gc/parallel/psVirtualspace.hpp hotspot/src/share/vm/gc/parallel/psYoungGen.cpp hotspot/src/share/vm/gc/parallel/psYoungGen.hpp hotspot/src/share/vm/gc/parallel/spaceCounters.cpp hotspot/src/share/vm/gc/parallel/spaceCounters.hpp hotspot/src/share/vm/gc/parallel/vmPSOperations.cpp hotspot/src/share/vm/gc/parallel/vmPSOperations.hpp hotspot/src/share/vm/gc/parallel/vmStructs_parallelgc.hpp hotspot/src/share/vm/gc/serial/cSpaceCounters.cpp hotspot/src/share/vm/gc/serial/cSpaceCounters.hpp hotspot/src/share/vm/gc/serial/defNewGeneration.cpp hotspot/src/share/vm/gc/serial/defNewGeneration.hpp hotspot/src/share/vm/gc/serial/defNewGeneration.inline.hpp hotspot/src/share/vm/gc/serial/genMarkSweep.cpp hotspot/src/share/vm/gc/serial/genMarkSweep.hpp hotspot/src/share/vm/gc/serial/markSweep.cpp hotspot/src/share/vm/gc/serial/markSweep.hpp hotspot/src/share/vm/gc/serial/markSweep.inline.hpp hotspot/src/share/vm/gc/serial/tenuredGeneration.cpp hotspot/src/share/vm/gc/serial/tenuredGeneration.hpp hotspot/src/share/vm/gc/serial/tenuredGeneration.inline.hpp hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.cpp hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.hpp hotspot/src/share/vm/gc/shared/ageTable.cpp hotspot/src/share/vm/gc/shared/ageTable.hpp hotspot/src/share/vm/gc/shared/allocTracer.cpp hotspot/src/share/vm/gc/shared/allocTracer.hpp hotspot/src/share/vm/gc/shared/barrierSet.cpp hotspot/src/share/vm/gc/shared/barrierSet.hpp hotspot/src/share/vm/gc/shared/barrierSet.inline.hpp hotspot/src/share/vm/gc/shared/blockOffsetTable.cpp hotspot/src/share/vm/gc/shared/blockOffsetTable.hpp hotspot/src/share/vm/gc/shared/blockOffsetTable.inline.hpp hotspot/src/share/vm/gc/shared/cardGeneration.cpp hotspot/src/share/vm/gc/shared/cardGeneration.hpp hotspot/src/share/vm/gc/shared/cardGeneration.inline.hpp hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp hotspot/src/share/vm/gc/shared/cardTableModRefBS.hpp hotspot/src/share/vm/gc/shared/cardTableModRefBS.inline.hpp hotspot/src/share/vm/gc/shared/cardTableRS.cpp hotspot/src/share/vm/gc/shared/cardTableRS.hpp hotspot/src/share/vm/gc/shared/collectedHeap.cpp hotspot/src/share/vm/gc/shared/collectedHeap.hpp hotspot/src/share/vm/gc/shared/collectedHeap.inline.hpp hotspot/src/share/vm/gc/shared/collectorCounters.cpp hotspot/src/share/vm/gc/shared/collectorCounters.hpp hotspot/src/share/vm/gc/shared/collectorPolicy.cpp hotspot/src/share/vm/gc/shared/collectorPolicy.hpp hotspot/src/share/vm/gc/shared/concurrentGCThread.cpp hotspot/src/share/vm/gc/shared/concurrentGCThread.hpp hotspot/src/share/vm/gc/shared/copyFailedInfo.hpp hotspot/src/share/vm/gc/shared/gcCause.cpp hotspot/src/share/vm/gc/shared/gcCause.hpp hotspot/src/share/vm/gc/shared/gcHeapSummary.hpp hotspot/src/share/vm/gc/shared/gcId.cpp hotspot/src/share/vm/gc/shared/gcId.hpp hotspot/src/share/vm/gc/shared/gcLocker.cpp hotspot/src/share/vm/gc/shared/gcLocker.hpp hotspot/src/share/vm/gc/shared/gcLocker.inline.hpp hotspot/src/share/vm/gc/shared/gcName.hpp hotspot/src/share/vm/gc/shared/gcPolicyCounters.cpp hotspot/src/share/vm/gc/shared/gcPolicyCounters.hpp hotspot/src/share/vm/gc/shared/gcStats.cpp hotspot/src/share/vm/gc/shared/gcStats.hpp hotspot/src/share/vm/gc/shared/gcTimer.cpp hotspot/src/share/vm/gc/shared/gcTimer.hpp hotspot/src/share/vm/gc/shared/gcTrace.cpp hotspot/src/share/vm/gc/shared/gcTrace.hpp hotspot/src/share/vm/gc/shared/gcTraceSend.cpp hotspot/src/share/vm/gc/shared/gcTraceTime.cpp hotspot/src/share/vm/gc/shared/gcTraceTime.hpp hotspot/src/share/vm/gc/shared/gcUtil.cpp hotspot/src/share/vm/gc/shared/gcUtil.hpp hotspot/src/share/vm/gc/shared/gcWhen.hpp hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp hotspot/src/share/vm/gc/shared/genOopClosures.cpp hotspot/src/share/vm/gc/shared/genOopClosures.hpp hotspot/src/share/vm/gc/shared/genOopClosures.inline.hpp hotspot/src/share/vm/gc/shared/genRemSet.cpp hotspot/src/share/vm/gc/shared/genRemSet.hpp hotspot/src/share/vm/gc/shared/generation.cpp hotspot/src/share/vm/gc/shared/generation.hpp hotspot/src/share/vm/gc/shared/generationCounters.cpp hotspot/src/share/vm/gc/shared/generationCounters.hpp hotspot/src/share/vm/gc/shared/generationSpec.cpp hotspot/src/share/vm/gc/shared/generationSpec.hpp hotspot/src/share/vm/gc/shared/isGCActiveMark.hpp hotspot/src/share/vm/gc/shared/liveRange.hpp hotspot/src/share/vm/gc/shared/modRefBarrierSet.hpp hotspot/src/share/vm/gc/shared/objectCountEventSender.cpp hotspot/src/share/vm/gc/shared/objectCountEventSender.hpp hotspot/src/share/vm/gc/shared/plab.cpp hotspot/src/share/vm/gc/shared/plab.hpp hotspot/src/share/vm/gc/shared/plab.inline.hpp hotspot/src/share/vm/gc/shared/referencePolicy.cpp hotspot/src/share/vm/gc/shared/referencePolicy.hpp hotspot/src/share/vm/gc/shared/referenceProcessor.cpp hotspot/src/share/vm/gc/shared/referenceProcessor.hpp hotspot/src/share/vm/gc/shared/referenceProcessorStats.hpp hotspot/src/share/vm/gc/shared/space.cpp hotspot/src/share/vm/gc/shared/space.hpp hotspot/src/share/vm/gc/shared/space.inline.hpp hotspot/src/share/vm/gc/shared/spaceDecorator.cpp hotspot/src/share/vm/gc/shared/spaceDecorator.hpp hotspot/src/share/vm/gc/shared/specialized_oop_closures.hpp hotspot/src/share/vm/gc/shared/strongRootsScope.cpp hotspot/src/share/vm/gc/shared/strongRootsScope.hpp hotspot/src/share/vm/gc/shared/taskqueue.cpp hotspot/src/share/vm/gc/shared/taskqueue.hpp hotspot/src/share/vm/gc/shared/taskqueue.inline.hpp hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.inline.hpp hotspot/src/share/vm/gc/shared/vmGCOperations.cpp hotspot/src/share/vm/gc/shared/vmGCOperations.hpp hotspot/src/share/vm/gc/shared/watermark.hpp hotspot/src/share/vm/gc/shared/workgroup.cpp hotspot/src/share/vm/gc/shared/workgroup.hpp 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/interpreter/bytecodeInterpreter.cpp hotspot/src/share/vm/interpreter/interpreterRuntime.cpp hotspot/src/share/vm/interpreter/linkResolver.cpp hotspot/src/share/vm/interpreter/rewriter.cpp hotspot/src/share/vm/interpreter/templateTable.cpp hotspot/src/share/vm/memory/allocation.cpp 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/binaryTreeDictionary.cpp 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/freeBlockDictionary.cpp hotspot/src/share/vm/memory/freeList.cpp hotspot/src/share/vm/memory/freeList.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/heapInspection.cpp hotspot/src/share/vm/memory/metaspace.cpp hotspot/src/share/vm/memory/metaspaceShared.cpp hotspot/src/share/vm/memory/modRefBarrierSet.hpp hotspot/src/share/vm/memory/oopFactory.cpp 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/universe.cpp hotspot/src/share/vm/memory/watermark.hpp hotspot/src/share/vm/oops/arrayKlass.cpp hotspot/src/share/vm/oops/constMethod.cpp hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp hotspot/src/share/vm/oops/instanceKlass.cpp hotspot/src/share/vm/oops/instanceKlass.hpp hotspot/src/share/vm/oops/instanceMirrorKlass.cpp hotspot/src/share/vm/oops/instanceMirrorKlass.hpp hotspot/src/share/vm/oops/instanceRefKlass.cpp hotspot/src/share/vm/oops/instanceRefKlass.hpp hotspot/src/share/vm/oops/instanceRefKlass.inline.hpp hotspot/src/share/vm/oops/klass.cpp hotspot/src/share/vm/oops/klass.hpp hotspot/src/share/vm/oops/klassVtable.cpp hotspot/src/share/vm/oops/method.cpp hotspot/src/share/vm/oops/objArrayKlass.cpp hotspot/src/share/vm/oops/objArrayOop.cpp hotspot/src/share/vm/oops/objArrayOop.hpp hotspot/src/share/vm/oops/oop.hpp hotspot/src/share/vm/oops/oop.inline.hpp hotspot/src/share/vm/oops/oopsHierarchy.cpp hotspot/src/share/vm/oops/typeArrayKlass.cpp hotspot/src/share/vm/opto/graphKit.cpp hotspot/src/share/vm/opto/machnode.cpp hotspot/src/share/vm/opto/runtime.cpp hotspot/src/share/vm/opto/type.cpp hotspot/src/share/vm/precompiled/precompiled.hpp hotspot/src/share/vm/prims/forte.cpp hotspot/src/share/vm/prims/jni.cpp hotspot/src/share/vm/prims/jvm.cpp hotspot/src/share/vm/prims/jvmtiExport.cpp hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp hotspot/src/share/vm/prims/jvmtiTagMap.cpp hotspot/src/share/vm/prims/jvmtiTagMap.hpp hotspot/src/share/vm/prims/jvmtiThreadState.cpp hotspot/src/share/vm/prims/unsafe.cpp hotspot/src/share/vm/prims/whitebox.cpp hotspot/src/share/vm/runtime/arguments.cpp hotspot/src/share/vm/runtime/fprofiler.cpp hotspot/src/share/vm/runtime/frame.cpp hotspot/src/share/vm/runtime/globals.cpp hotspot/src/share/vm/runtime/init.cpp hotspot/src/share/vm/runtime/interfaceSupport.cpp hotspot/src/share/vm/runtime/interfaceSupport.hpp hotspot/src/share/vm/runtime/java.cpp hotspot/src/share/vm/runtime/memprofiler.cpp hotspot/src/share/vm/runtime/os.cpp hotspot/src/share/vm/runtime/safepoint.cpp hotspot/src/share/vm/runtime/sharedRuntime.cpp hotspot/src/share/vm/runtime/thread.cpp hotspot/src/share/vm/runtime/thread.hpp hotspot/src/share/vm/runtime/threadLocalStorage.hpp hotspot/src/share/vm/runtime/unhandledOops.cpp hotspot/src/share/vm/runtime/vmStructs.cpp hotspot/src/share/vm/runtime/vmThread.cpp hotspot/src/share/vm/runtime/vm_operations.cpp hotspot/src/share/vm/services/attachListener.cpp hotspot/src/share/vm/services/diagnosticCommand.cpp hotspot/src/share/vm/services/g1MemoryPool.cpp hotspot/src/share/vm/services/g1MemoryPool.hpp hotspot/src/share/vm/services/heapDumper.cpp hotspot/src/share/vm/services/memoryPool.cpp hotspot/src/share/vm/services/memoryService.cpp hotspot/src/share/vm/services/memoryService.hpp hotspot/src/share/vm/services/psMemoryPool.hpp hotspot/src/share/vm/shark/sharkBuilder.hpp hotspot/src/share/vm/utilities/debug.cpp hotspot/src/share/vm/utilities/ostream.cpp 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/top.hpp hotspot/src/share/vm/utilities/vmError.cpp 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/TEST.groups hotspot/test/gc/cms/DisableResizePLAB.java hotspot/test/gc/cms/GuardShrinkWarning.java hotspot/test/gc/concurrentMarkSweep/DisableResizePLAB.java hotspot/test/gc/concurrentMarkSweep/GuardShrinkWarning.java hotspot/test/gc/defnew/HeapChangeLogging.java hotspot/test/gc/parallel/AdaptiveGCBoundary.java hotspot/test/gc/parallel/TestDynShrinkHeap.java hotspot/test/gc/parallelScavenge/AdaptiveGCBoundary.java hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java hotspot/test/gc/serial/HeapChangeLogging.java
diffstat 887 files changed, 119780 insertions(+), 119872 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/agent/make/Makefile	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/make/Makefile	Wed May 13 15:16:06 2015 +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	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Wed May 13 15:16:06 2015 +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.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java	Wed May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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.memory.MemRegion;
+import sun.jvm.hotspot.memory.SpaceClosure;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for G1CollectedHeap.
+
+public class G1CollectedHeap extends CollectedHeap {
+    // HeapRegionManager _hrm;
+    static private long hrmFieldOffset;
+    // MemRegion _g1_reserved;
+    static private long g1ReservedFieldOffset;
+    // G1Allocator* _allocator
+    static private AddressField g1Allocator;
+    // G1MonitoringSupport* _g1mm;
+    static private AddressField g1mmField;
+    // HeapRegionSet _old_set;
+    static private long oldSetFieldOffset;
+    // HeapRegionSet _humongous_set;
+    static private long humongousSetFieldOffset;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("G1CollectedHeap");
+
+        hrmFieldOffset = type.getField("_hrm").getOffset();
+        g1Allocator = type.getAddressField("_allocator");
+        g1mmField = type.getAddressField("_g1mm");
+        oldSetFieldOffset = type.getField("_old_set").getOffset();
+        humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
+    }
+
+    public long capacity() {
+        return hrm().capacity();
+    }
+
+    public long used() {
+        return allocator().getSummaryBytes();
+    }
+
+    public long n_regions() {
+        return hrm().length();
+    }
+
+    private HeapRegionManager hrm() {
+        Address hrmAddr = addr.addOffsetTo(hrmFieldOffset);
+        return (HeapRegionManager) VMObjectFactory.newObject(HeapRegionManager.class,
+                                                         hrmAddr);
+    }
+
+    public G1MonitoringSupport g1mm() {
+        Address g1mmAddr = g1mmField.getValue(addr);
+        return (G1MonitoringSupport) VMObjectFactory.newObject(G1MonitoringSupport.class, g1mmAddr);
+    }
+
+    public G1Allocator allocator() {
+        Address g1AllocatorAddr = g1Allocator.getValue(addr);
+        return (G1Allocator) VMObjectFactory.newObject(G1Allocator.class, g1AllocatorAddr);
+    }
+
+    public HeapRegionSetBase oldSet() {
+        Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset);
+        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
+                                                             oldSetAddr);
+    }
+
+    public HeapRegionSetBase humongousSet() {
+        Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset);
+        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
+                                                             humongousSetAddr);
+    }
+
+    private Iterator<HeapRegion> heapRegionIterator() {
+        return hrm().heapRegionIterator();
+    }
+
+    public void heapRegionIterate(SpaceClosure scl) {
+        Iterator<HeapRegion> iter = heapRegionIterator();
+        while (iter.hasNext()) {
+            HeapRegion hr = iter.next();
+            scl.doSpace(hr);
+        }
+    }
+
+    public CollectedHeapName kind() {
+        return CollectedHeapName.G1_COLLECTED_HEAP;
+    }
+
+    public G1CollectedHeap(Address addr) {
+        super(addr);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java	Wed May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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.memory.CompactibleSpace;
+import sun.jvm.hotspot.memory.MemRegion;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.types.AddressField;
+import sun.jvm.hotspot.types.CIntegerField;
+import sun.jvm.hotspot.types.Type;
+import sun.jvm.hotspot.types.TypeDataBase;
+
+// Mirror class for HeapRegion. Currently we don't actually include
+// any of its fields but only iterate over it.
+
+public class HeapRegion extends CompactibleSpace {
+    // static int GrainBytes;
+    static private CIntegerField grainBytesField;
+    static private AddressField topField;
+
+    static {
+        VM.registerVMInitializedObserver(new Observer() {
+                public void update(Observable o, Object data) {
+                    initialize(VM.getVM().getTypeDataBase());
+                }
+            });
+    }
+
+    static private synchronized void initialize(TypeDataBase db) {
+        Type type = db.lookupType("HeapRegion");
+
+        grainBytesField = type.getCIntegerField("GrainBytes");
+        topField = type.getAddressField("_top");
+
+    }
+
+    static public long grainBytes() {
+        return grainBytesField.getValue();
+    }
+
+    public HeapRegion(Address addr) {
+        super(addr);
+    }
+
+    public Address top() {
+        return topField.getValue(addr);
+    }
+
+    @Override
+    public List getLiveRegions() {
+        List res = new ArrayList();
+        res.add(new MemRegion(bottom(), top()));
+        return res;
+    }
+
+    @Override
+    public long used() {
+        return top().minus(bottom());
+    }
+
+    @Override
+    public long free() {
+        return end().minus(top());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java	Wed May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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/PSOldGen.java	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,79 @@
+/*
+ * 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.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 May 13 15:16:06 2015 +0200
@@ -0,0 +1,103 @@
+/*
+ * 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.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 May 13 15:16:06 2015 +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/shared/CollectedHeap.java	Wed May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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/G1YCType.java	Wed May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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 May 13 15:16:06 2015 +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/ImmutableSpace.java	Wed May 13 15:16:06 2015 +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.shared;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public abstract class ImmutableSpace extends VMObject {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("ImmutableSpace");
+      bottomField = type.getAddressField("_bottom");
+      endField    = type.getAddressField("_end");
+   }
+
+   public ImmutableSpace(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField bottomField;
+   private static AddressField endField;
+
+   // Accessors
+   public Address   bottom()       { return bottomField.getValue(addr); }
+   public Address   end()          { return endField.getValue(addr);    }
+
+   /** Returns a subregion of the space containing all the objects in
+      the space. */
+   public MemRegion usedRegion() {
+      return new MemRegion(bottom(), end());
+   }
+
+   /** Support for iteration over heap -- not sure how this will
+      interact with GC in reflective system, but necessary for the
+      debugging mechanism */
+   public OopHandle bottomAsOopHandle() {
+      return bottomField.getOopHandle(addr);
+   }
+
+   /** returns all MemRegions where live objects are */
+   public abstract List/*<MemRegion>*/ getLiveRegions();
+
+   /** Returned value is in bytes */
+   public long capacity() { return end().minus(bottom()); }
+
+   public abstract long used();
+
+   /** Testers */
+   public boolean contains(Address p) {
+      return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
+   }
+
+   public void print() { printOn(System.out); }
+   public abstract void printOn(PrintStream tty);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/MutableSpace.java	Wed May 13 15:16:06 2015 +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.shared;
+
+import java.io.*;
+import java.util.*;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.memory.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class MutableSpace extends ImmutableSpace {
+   static {
+      VM.registerVMInitializedObserver(new Observer() {
+         public void update(Observable o, Object data) {
+            initialize(VM.getVM().getTypeDataBase());
+         }
+      });
+   }
+
+   private static synchronized void initialize(TypeDataBase db) {
+      Type type = db.lookupType("MutableSpace");
+      topField    = type.getAddressField("_top");
+   }
+
+   public MutableSpace(Address addr) {
+      super(addr);
+   }
+
+   // Fields
+   private static AddressField topField;
+
+   // Accessors
+   public Address   top()          { return topField.getValue(addr);    }
+
+   /** In bytes */
+   public long used() {
+      return top().minus(bottom());
+   }
+
+   /** returns all MemRegions where live objects are */
+   public List/*<MemRegion>*/ getLiveRegions() {
+      List res = new ArrayList();
+      res.add(new MemRegion(bottom(), top()));
+      return res;
+   }
+
+   public void printOn(PrintStream tty) {
+      tty.print(" [" + bottom() + "," +
+                top() + "," + end() + "] ");
+   }
+}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-public class G1Allocator extends VMObject {
-
-  //size_t _summary_bytes_used;
-  static private CIntegerField summaryBytesUsedField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-      public void update(Observable o, Object data) {
-        initialize(VM.getVM().getTypeDataBase());
-      }
-    });
-  }
-
-  static private synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("G1Allocator");
-
-    summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
-  }
-
-  public long getSummaryBytes() {
-    return summaryBytesUsedField.getValue(addr);
-  }
-
-  public G1Allocator(Address addr) {
-    super(addr);
-
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.gc_interface.CollectedHeap;
-import sun.jvm.hotspot.gc_interface.CollectedHeapName;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.memory.SpaceClosure;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1CollectedHeap.
-
-public class G1CollectedHeap extends CollectedHeap {
-    // HeapRegionManager _hrm;
-    static private long hrmFieldOffset;
-    // MemRegion _g1_reserved;
-    static private long g1ReservedFieldOffset;
-    // G1Allocator* _allocator
-    static private AddressField g1Allocator;
-    // G1MonitoringSupport* _g1mm;
-    static private AddressField g1mmField;
-    // HeapRegionSet _old_set;
-    static private long oldSetFieldOffset;
-    // HeapRegionSet _humongous_set;
-    static private long humongousSetFieldOffset;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1CollectedHeap");
-
-        hrmFieldOffset = type.getField("_hrm").getOffset();
-        g1Allocator = type.getAddressField("_allocator");
-        g1mmField = type.getAddressField("_g1mm");
-        oldSetFieldOffset = type.getField("_old_set").getOffset();
-        humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
-    }
-
-    public long capacity() {
-        return hrm().capacity();
-    }
-
-    public long used() {
-        return allocator().getSummaryBytes();
-    }
-
-    public long n_regions() {
-        return hrm().length();
-    }
-
-    private HeapRegionManager hrm() {
-        Address hrmAddr = addr.addOffsetTo(hrmFieldOffset);
-        return (HeapRegionManager) VMObjectFactory.newObject(HeapRegionManager.class,
-                                                         hrmAddr);
-    }
-
-    public G1MonitoringSupport g1mm() {
-        Address g1mmAddr = g1mmField.getValue(addr);
-        return (G1MonitoringSupport) VMObjectFactory.newObject(G1MonitoringSupport.class, g1mmAddr);
-    }
-
-    public G1Allocator allocator() {
-        Address g1AllocatorAddr = g1Allocator.getValue(addr);
-        return (G1Allocator) VMObjectFactory.newObject(G1Allocator.class, g1AllocatorAddr);
-    }
-
-    public HeapRegionSetBase oldSet() {
-        Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             oldSetAddr);
-    }
-
-    public HeapRegionSetBase humongousSet() {
-        Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             humongousSetAddr);
-    }
-
-    private Iterator<HeapRegion> heapRegionIterator() {
-        return hrm().heapRegionIterator();
-    }
-
-    public void heapRegionIterate(SpaceClosure scl) {
-        Iterator<HeapRegion> iter = heapRegionIterator();
-        while (iter.hasNext()) {
-            HeapRegion hr = iter.next();
-            scl.doSpace(hr);
-        }
-    }
-
-    public CollectedHeapName kind() {
-        return CollectedHeapName.G1_COLLECTED_HEAP;
-    }
-
-    public G1CollectedHeap(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1HeapRegionTable. It's essentially an index -> HeapRegion map.
-
-public class G1HeapRegionTable extends VMObject {
-    // HeapRegion** _base;
-    static private AddressField baseField;
-    // uint _length;
-    static private CIntegerField lengthField;
-    // HeapRegion** _biased_base
-    static private AddressField biasedBaseField;
-    // size_t _bias
-    static private CIntegerField biasField;
-    // uint _shift_by
-    static private CIntegerField shiftByField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1HeapRegionTable");
-
-        baseField = type.getAddressField("_base");
-        lengthField = type.getCIntegerField("_length");
-        biasedBaseField = type.getAddressField("_biased_base");
-        biasField = type.getCIntegerField("_bias");
-        shiftByField = type.getCIntegerField("_shift_by");
-    }
-
-    private HeapRegion at(long index) {
-        Address arrayAddr = baseField.getValue(addr);
-        // Offset of &_base[index]
-        long offset = index * VM.getVM().getAddressSize();
-        Address regionAddr = arrayAddr.getAddressAt(offset);
-        return (HeapRegion) VMObjectFactory.newObject(HeapRegion.class,
-                                                      regionAddr);
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long bias() {
-        return biasField.getValue(addr);
-    }
-
-    public long shiftBy() {
-        return shiftByField.getValue(addr);
-    }
-
-    private class HeapRegionIterator implements Iterator<HeapRegion> {
-        private long index;
-        private long length;
-        private HeapRegion next;
-
-        public HeapRegion positionToNext() {
-          HeapRegion result = next;
-          while (index < length && at(index) == null) {
-            index++;
-          }
-          if (index < length) {
-            next = at(index);
-            index++; // restart search at next element
-          } else {
-            next = null;
-          }
-          return result;
-        }
-
-        @Override
-        public boolean hasNext() { return next != null;     }
-
-        @Override
-        public HeapRegion next() { return positionToNext(); }
-
-        @Override
-        public void remove()     { /* not supported */      }
-
-        HeapRegionIterator(long totalLength) {
-            index = 0;
-            length = totalLength;
-            positionToNext();
-        }
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator(long committedLength) {
-        return new HeapRegionIterator(committedLength);
-    }
-
-    public G1HeapRegionTable(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1MonitoringSupport.
-
-public class G1MonitoringSupport extends VMObject {
-    // size_t _eden_committed;
-    static private CIntegerField edenCommittedField;
-    // size_t _eden_used;
-    static private CIntegerField edenUsedField;
-    // size_t _survivor_committed;
-    static private CIntegerField survivorCommittedField;
-    // size_t _survivor_used;
-    static private CIntegerField survivorUsedField;
-    // size_t _old_committed;
-    static private CIntegerField oldCommittedField;
-    // size_t _old_used;
-    static private CIntegerField oldUsedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1MonitoringSupport");
-
-        edenCommittedField = type.getCIntegerField("_eden_committed");
-        edenUsedField = type.getCIntegerField("_eden_used");
-        survivorCommittedField = type.getCIntegerField("_survivor_committed");
-        survivorUsedField = type.getCIntegerField("_survivor_used");
-        oldCommittedField = type.getCIntegerField("_old_committed");
-        oldUsedField = type.getCIntegerField("_old_used");
-    }
-
-    public long edenCommitted() {
-        return edenCommittedField.getValue(addr);
-    }
-
-    public long edenUsed() {
-        return edenUsedField.getValue(addr);
-    }
-
-    public long edenRegionNum() {
-        return edenUsed() / HeapRegion.grainBytes();
-    }
-
-    public long survivorCommitted() {
-        return survivorCommittedField.getValue(addr);
-    }
-
-    public long survivorUsed() {
-        return survivorUsedField.getValue(addr);
-    }
-
-    public long survivorRegionNum() {
-        return survivorUsed() / HeapRegion.grainBytes();
-    }
-
-    public long oldCommitted() {
-        return oldCommittedField.getValue(addr);
-    }
-
-    public long oldUsed() {
-        return oldUsedField.getValue(addr);
-    }
-
-    public G1MonitoringSupport(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.memory.CompactibleSpace;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegion. Currently we don't actually include
-// any of its fields but only iterate over it.
-
-public class HeapRegion extends CompactibleSpace {
-    // static int GrainBytes;
-    static private CIntegerField grainBytesField;
-    static private AddressField topField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegion");
-
-        grainBytesField = type.getCIntegerField("GrainBytes");
-        topField = type.getAddressField("_top");
-
-    }
-
-    static public long grainBytes() {
-        return grainBytesField.getValue();
-    }
-
-    public HeapRegion(Address addr) {
-        super(addr);
-    }
-
-    public Address top() {
-        return topField.getValue(addr);
-    }
-
-    @Override
-    public List getLiveRegions() {
-        List res = new ArrayList();
-        res.add(new MemRegion(bottom(), top()));
-        return res;
-    }
-
-    @Override
-    public long used() {
-        return top().minus(bottom());
-    }
-
-    @Override
-    public long free() {
-        return end().minus(top());
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionManager.
-
-public class HeapRegionManager extends VMObject {
-    // G1HeapRegionTable _regions
-    static private long regionsFieldOffset;
-    // uint _committed_length
-    static private CIntegerField numCommittedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionManager");
-
-        regionsFieldOffset = type.getField("_regions").getOffset();
-        numCommittedField = type.getCIntegerField("_num_committed");
-    }
-
-    private G1HeapRegionTable regions() {
-        Address regionsAddr = addr.addOffsetTo(regionsFieldOffset);
-        return (G1HeapRegionTable) VMObjectFactory.newObject(G1HeapRegionTable.class,
-                                                             regionsAddr);
-    }
-
-    public long capacity() {
-        return length() * HeapRegion.grainBytes();
-    }
-
-    public long length() {
-        return regions().length();
-    }
-
-    public long committedLength() {
-        return numCommittedField.getValue(addr);
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator() {
-        return regions().heapRegionIterator(length());
-    }
-
-    public HeapRegionManager(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetBase. Represents a group of regions.
-
-public class HeapRegionSetBase extends VMObject {
-
-    static private long countField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetBase");
-
-        countField = type.getField("_count").getOffset();
-    }
-
-
-    public HeapRegionSetCount count() {
-        Address countFieldAddr = addr.addOffsetTo(countField);
-        return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr);
-    }
-
-    public HeapRegionSetBase(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetCount. Represents a group of regions.
-
-public class HeapRegionSetCount extends VMObject {
-
-    static private CIntegerField lengthField;
-    static private CIntegerField capacityField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetCount");
-
-        lengthField   = type.getCIntegerField("_length");
-        capacityField = type.getCIntegerField("_capacity");
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long capacity() {
-        return capacityField.getValue(addr);
-    }
-
-    public HeapRegionSetCount(Address addr) {
-        super(addr);
-    }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSOldGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSOldGen");
-      objectSpaceField = type.getAddressField("_object_space");
-   }
-
-   public PSOldGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField objectSpaceField;
-
-   // Accessors
-   public MutableSpace objectSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, objectSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return objectSpace().capacity();
-   }
-
-   public long used() {
-      return objectSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      return objectSpace().contains(a);
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSOldGen [ ");
-      objectSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSYoungGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSYoungGen");
-      edenSpaceField = type.getAddressField("_eden_space");
-      fromSpaceField = type.getAddressField("_from_space");
-      toSpaceField = type.getAddressField("_to_space");
-   }
-
-   public PSYoungGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField edenSpaceField;
-   private static AddressField fromSpaceField;
-   private static AddressField toSpaceField;
-
-   // Accessors
-   public MutableSpace edenSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, edenSpaceField.getValue(addr));
-   }
-
-   public MutableSpace fromSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, fromSpaceField.getValue(addr));
-   }
-
-   public MutableSpace toSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, toSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return edenSpace().capacity() + fromSpace().capacity();
-   }
-
-   public long used() {
-      return edenSpace().used() + fromSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (edenSpace().contains(a)) {
-         return true;
-      }
-
-      if (fromSpace().contains(a)) {
-         return true;
-      }
-      return false;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSYoungGen [ ");
-      tty.print("eden = ");
-      edenSpace().printOn(tty);
-      tty.print(", from = ");
-      fromSpace().printOn(tty);
-      tty.print(", to = ");
-      toSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class ParallelScavengeHeap extends CollectedHeap {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ParallelScavengeHeap");
-      youngGenField = type.getAddressField("_young_gen");
-      oldGenField    = type.getAddressField("_old_gen");
-   }
-
-   public ParallelScavengeHeap(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField youngGenField;
-   private static AddressField oldGenField;
-
-   // Accessors
-   public PSYoungGen youngGen() {
-      return (PSYoungGen) VMObjectFactory.newObject(PSYoungGen.class, youngGenField.getValue());
-   }
-
-   public PSOldGen oldGen() {
-      return (PSOldGen) VMObjectFactory.newObject(PSOldGen.class, oldGenField.getValue());
-   }
-
-   public long capacity() {
-      return youngGen().capacity() + oldGen().capacity();
-   }
-
-   public long used() {
-      return youngGen().used() + oldGen().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (youngGen().isIn(a)) {
-         return true;
-      }
-
-      if (oldGen().isIn(a)) {
-         return true;
-      }
-
-      return false;
-   }
-
-   public CollectedHeapName kind() {
-      return CollectedHeapName.PARALLEL_SCAVENGE_HEAP;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("ParallelScavengeHeap [ ");
-      youngGen().printOn(tty);
-      oldGen().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class ImmutableSpace extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ImmutableSpace");
-      bottomField = type.getAddressField("_bottom");
-      endField    = type.getAddressField("_end");
-   }
-
-   public ImmutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField bottomField;
-   private static AddressField endField;
-
-   // Accessors
-   public Address   bottom()       { return bottomField.getValue(addr); }
-   public Address   end()          { return endField.getValue(addr);    }
-
-   /** Returns a subregion of the space containing all the objects in
-      the space. */
-   public MemRegion usedRegion() {
-      return new MemRegion(bottom(), end());
-   }
-
-   /** Support for iteration over heap -- not sure how this will
-      interact with GC in reflective system, but necessary for the
-      debugging mechanism */
-   public OopHandle bottomAsOopHandle() {
-      return bottomField.getOopHandle(addr);
-   }
-
-   /** returns all MemRegions where live objects are */
-   public abstract List/*<MemRegion>*/ getLiveRegions();
-
-   /** Returned value is in bytes */
-   public long capacity() { return end().minus(bottom()); }
-
-   public abstract long used();
-
-   /** Testers */
-   public boolean contains(Address p) {
-      return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
-   }
-
-   public void print() { printOn(System.out); }
-   public abstract void printOn(PrintStream tty);
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class MutableSpace extends ImmutableSpace {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("MutableSpace");
-      topField    = type.getAddressField("_top");
-   }
-
-   public MutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField topField;
-
-   // Accessors
-   public Address   top()          { return topField.getValue(addr);    }
-
-   /** In bytes */
-   public long used() {
-      return top().minus(bottom());
-   }
-
-   /** returns all MemRegions where live objects are */
-   public List/*<MemRegion>*/ getLiveRegions() {
-      List res = new ArrayList();
-      res.add(new MemRegion(bottom(), top()));
-      return res;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print(" [" + bottom() + "," +
-                top() + "," + end() + "] ");
-   }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class CollectedHeap extends VMObject {
-  private static long         reservedFieldOffset;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CollectedHeap");
-
-    reservedFieldOffset = type.getField("_reserved").getOffset();
-  }
-
-  public CollectedHeap(Address addr) {
-    super(addr);
-  }
-
-  /** Returns the lowest address of the heap. */
-  public Address start() {
-    return reservedRegion().start();
-  }
-
-  public long capacity() { return 0; }
-  public long used()     { return 0; }
-
-  public MemRegion reservedRegion() {
-    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
-  }
-
-  public boolean isIn(Address a) {
-    return isInReserved(a);
-  }
-
-  public boolean isInReserved(Address a) {
-    return reservedRegion().contains(a);
-  }
-
-  public abstract CollectedHeapName kind();
-
-  public void print() { printOn(System.out); }
-  public void printOn(PrintStream tty) {
-    MemRegion mr = reservedRegion();
-    tty.println("unknown subtype of CollectedHeap @ " + getAddress() + " (" +
-                mr.start() + "," + mr.end() + ")");
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-/** Mimics the enums in the VM under CollectedHeap::Name */
-
-public class CollectedHeapName {
-  private String name;
-
-  private CollectedHeapName(String name) { this.name = name; }
-
-  public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap");
-  public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap");
-  public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
-
-  public String toString() {
-    return name;
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot
-//code.
-
-public enum G1YCType {
-  Normal ("Normal"),
-  InitialMark ("Initial Mark"),
-  DuringMark ("During Mark"),
-  Mixed ("Mixed"),
-  G1YCTypeEndSentinel ("Unknown");
-
-  private final String value;
-
-  G1YCType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCCause {
-  _java_lang_system_gc ("System.gc()"),
-  _full_gc_alot ("FullGCAlot"),
-  _scavenge_alot ("ScavengeAlot"),
-  _allocation_profiler ("Allocation Profiler"),
-  _jvmti_force_gc ("JvmtiEnv ForceGarbageCollection"),
-  _gc_locker ("GCLocker Initiated GC"),
-  _heap_inspection ("Heap Inspection Initiated GC"),
-  _heap_dump ("Heap Dump Initiated GC"),
-
-  _no_gc ("No GC"),
-  _no_cause_specified ("Unknown GCCause"),
-  _allocation_failure ("Allocation Failure"),
-
-  _tenured_generation_full ("Tenured Generation Full"),
-  _metadata_GC_threshold ("Metadata GC Threshold"),
-
-  _cms_generation_full ("CMS Generation Full"),
-  _cms_initial_mark ("CMS Initial Mark"),
-  _cms_final_remark ("CMS Final Remark"),
-  _cms_concurrent_mark ("CMS Concurrent Mark"),
-
-  _old_generation_expanded_on_last_scavenge ("Old Generation Expanded On Last Scavenge"),
-  _old_generation_too_full_to_scavenge ("Old Generation Too Full To Scavenge"),
-  _adaptive_size_policy ("Ergonomics"),
-
-  _g1_inc_collection_pause ("G1 Evacuation Pause"),
-  _g1_humongous_allocation ("G1 Humongous Allocation"),
-
-  _last_ditch_collection ("Last ditch collection"),
-  _last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE");
-
-  private final String value;
-
-  GCCause(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCName {
-  ParallelOld ("ParallelOld"),
-  SerialOld ("SerialOld"),
-  PSMarkSweep ("PSMarkSweep"),
-  ParallelScavenge ("ParallelScavenge"),
-  DefNew ("DefNew"),
-  ParNew ("ParNew"),
-  G1New ("G1New"),
-  ConcurrentMarkSweep ("ConcurrentMarkSweep"),
-  G1Old ("G1Old"),
-  GCNameEndSentinel ("GCNameEndSentinel");
-
-  private final String value;
-
-  GCName(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCWhen {
-  BeforeGC ("Before GC"),
-  AfterGC ("After GC"),
-  GCWhenEndSentinel ("GCWhenEndSentinel");
-
-  private final String value;
-
-  GCWhen(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
-
-
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java	Mon May 11 16:30:26 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum ReferenceType {
-  REF_NONE ("None reference"),       // Regular class
-  REF_OTHER ("Other reference"),     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
-  REF_SOFT ("Soft reference"),       // Subclass of java/lang/ref/SoftReference
-  REF_WEAK ("Weak reference"),       // Subclass of java/lang/ref/WeakReference
-  REF_FINAL ("Final reference"),     // Subclass of java/lang/ref/FinalReference
-  REF_PHANTOM ("Phantom reference"); // Subclass of java/lang/ref/PhantomReference
-
-  private final String value;
-
-  ReferenceType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java	Wed May 13 15:16:06 2015 +0200
@@ -28,7 +28,7 @@
 import java.util.*;
 
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.types.*;
 import sun.jvm.hotspot.utilities.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ReferenceType.java	Wed May 13 15:16:06 2015 +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.memory;
+
+//These definitions should be kept in sync with the definitions in the HotSpot code.
+
+public enum ReferenceType {
+  REF_NONE ("None reference"),       // Regular class
+  REF_OTHER ("Other reference"),     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
+  REF_SOFT ("Soft reference"),       // Subclass of java/lang/ref/SoftReference
+  REF_WEAK ("Weak reference"),       // Subclass of java/lang/ref/WeakReference
+  REF_FINAL ("Final reference"),     // Subclass of java/lang/ref/FinalReference
+  REF_PHANTOM ("Phantom reference"); // Subclass of java/lang/ref/PhantomReference
+
+  private final String value;
+
+  ReferenceType(String val) {
+    this.value = val;
+  }
+  public String value() {
+    return value;
+  }
+}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Wed May 13 15:16:06 2015 +0200
@@ -27,9 +27,9 @@
 import java.io.*;
 import java.util.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.gc_implementation.g1.G1CollectedHeap;
-import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.gc.g1.G1CollectedHeap;
+import sun.jvm.hotspot.gc.parallel.*;
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.types.*;
 import sun.jvm.hotspot.runtime.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Wed May 13 15:16:06 2015 +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
@@ -32,9 +32,9 @@
 import java.util.*;
 
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.gc_implementation.g1.*;
-import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.gc.g1.*;
+import sun.jvm.hotspot.gc.parallel.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.types.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,10 +25,10 @@
 package sun.jvm.hotspot.tools;
 
 import java.util.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.gc_implementation.g1.*;
-import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
+import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.gc.g1.*;
+import sun.jvm.hotspot.gc.parallel.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.debugger.JVMDebugger;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/LivenessAnalysis.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/LivenessAnalysis.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -27,7 +27,7 @@
 import java.io.*;
 import java.util.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.runtime.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/MarkBits.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/MarkBits.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,7 +25,7 @@
 package sun.jvm.hotspot.utilities;
 
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.runtime.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, 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
@@ -26,7 +26,7 @@
 
 import sun.jvm.hotspot.code.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.interpreter.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.memory.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, 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
@@ -27,7 +27,7 @@
 import java.io.*;
 import sun.jvm.hotspot.code.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.interpreter.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.memory.*;
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -27,7 +27,7 @@
 import java.io.*;
 import java.util.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
+import sun.jvm.hotspot.gc.shared.*;
 import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.runtime.*;
--- a/hotspot/make/aix/makefiles/vm.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/aix/makefiles/vm.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -137,7 +137,7 @@
 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 LIBJVM_DIZ         = lib$(JVM).diz
 
-SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
+SPECIAL_PATHS:=adlc c1 gc opto shark libadt
 
 SOURCE_PATHS=\
   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
--- a/hotspot/make/bsd/makefiles/vm.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/bsd/makefiles/vm.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 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
@@ -154,7 +154,7 @@
   LIBJVM_DIZ         = lib$(JVM).diz
 endif
 
-SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
+SPECIAL_PATHS:=adlc c1 gc opto shark libadt
 
 SOURCE_PATHS=\
   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
--- a/hotspot/make/excludeSrc.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/excludeSrc.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -81,36 +81,15 @@
       CXXFLAGS += -DINCLUDE_ALL_GCS=0
       CFLAGS += -DINCLUDE_ALL_GCS=0
 
-      gc_impl := $(HS_COMMON_SRC)/share/vm/gc_implementation
-      gc_impl_alt := $(HS_ALT_SRC)/share/vm/gc_implementation
-      gc_subdirs := concurrentMarkSweep g1 parallelScavenge parNew
+      gc_dir := $(HS_COMMON_SRC)/share/vm/gc
+      gc_dir_alt := $(HS_ALT_SRC)/share/vm/gc
+      gc_subdirs := cms g1 parallel
       gc_exclude := $(foreach gc,$(gc_subdirs),				\
-		     $(notdir $(wildcard $(gc_impl)/$(gc)/*.cpp))	\
-		     $(notdir $(wildcard $(gc_impl_alt)/$(gc)/*.cpp)))
-      Src_Files_EXCLUDE += $(gc_exclude)
-
-      # Exclude everything in $(gc_impl)/shared except the files listed
-      # in $(gc_shared_keep).
-      gc_shared_all := $(notdir $(wildcard $(gc_impl)/shared/*.cpp))
-      gc_shared_keep :=							\
-	adaptiveSizePolicy.cpp						\
-	ageTable.cpp							\
-	collectorCounters.cpp						\
-	cSpaceCounters.cpp						\
-	gcId.cpp							\
-	gcPolicyCounters.cpp						\
-	gcStats.cpp							\
-	gcTimer.cpp							\
-	gcTrace.cpp							\
-	gcTraceSend.cpp							\
-	gcTraceTime.cpp							\
-	gcUtil.cpp							\
-	generationCounters.cpp						\
-	markSweep.cpp							\
-	objectCountEventSender.cpp					\
-	spaceDecorator.cpp						\
-	vmGCOperations.cpp
-      Src_Files_EXCLUDE += $(filter-out $(gc_shared_keep),$(gc_shared_all))
+		     $(notdir $(wildcard $(gc_dir)/$(gc)/*.cpp))	\
+		     $(notdir $(wildcard $(gc_dir_alt)/$(gc)/*.cpp)))
+      Src_Files_EXCLUDE += $(gc_exclude)				\
+	concurrentGCThread.cpp						\
+	plab.cpp
 
       # src/share/vm/services
       Src_Files_EXCLUDE +=						\
--- a/hotspot/make/linux/makefiles/vm.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/linux/makefiles/vm.make	Wed May 13 15:16:06 2015 +0200
@@ -142,7 +142,7 @@
 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 LIBJVM_DIZ         = lib$(JVM).diz
 
-SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
+SPECIAL_PATHS:=adlc c1 gc opto shark libadt
 
 SOURCE_PATHS=\
   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
--- a/hotspot/make/pic.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/pic.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -37,7 +37,7 @@
     PARTIAL_NONPIC=0
   endif
   ifeq ($(PARTIAL_NONPIC),1)
-    NONPIC_DIRS  = memory oops gc_implementation gc_interface 
+    NONPIC_DIRS  = memory oops gc
     NONPIC_DIRS  := $(foreach dir,$(NONPIC_DIRS), $(GAMMADIR)/src/share/vm/$(dir))
     # Look for source files under NONPIC_DIRS
     NONPIC_FILES := $(foreach dir,$(NONPIC_DIRS),\
--- a/hotspot/make/sa.files	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/sa.files	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -79,10 +79,9 @@
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windows/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windows/amd64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/x86/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc_implementation/g1/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc_implementation/parallelScavenge/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc_implementation/shared/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc_interface/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/g1/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/parallel/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/shared/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/interpreter/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/jdi/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/memory/*.java \
--- a/hotspot/make/solaris/makefiles/vm.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/solaris/makefiles/vm.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 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
@@ -163,7 +163,7 @@
 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 LIBJVM_DIZ         = lib$(JVM).diz
 
-SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
+SPECIAL_PATHS:=adlc c1 dist gc opto shark libadt
 
 SOURCE_PATHS=\
   $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
--- a/hotspot/make/windows/create_obj_files.sh	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/windows/create_obj_files.sh	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -57,11 +57,11 @@
 COMMONSRC=${WorkSpace}/${COMMONSRC_REL}
 ALTSRC=${WorkSpace}/${ALTSRC_REL}
 
-BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`"
-BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
+BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc -o -name opto -o -name shark -o -name libadt \); fi`"
+BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc -o -name opto -o -name shark -o -name libadt \)`"
 
 for sd in \
-    share/vm/gc_implementation/shared \
+    share/vm/gc/shared \
     os/${Platform_os_family}/vm \
     cpu/${Platform_arch}/vm \
     os_cpu/${Platform_os_arch}/vm; do 
@@ -80,10 +80,10 @@
 BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/share/vm/prims/wbtestmethods"
 
 # shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
-if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then
-  BASE_PATHS="${BASE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
+if [ -d "${ALTSRC}/share/vm/gc" ]; then
+  BASE_PATHS="${BASE_PATHS} `$FIND ${ALTSRC}/share/vm/gc ! -name gc -prune -type d \! -name shared`"
 fi
-BASE_PATHS="${BASE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
+BASE_PATHS="${BASE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc ! -name gc -prune -type d \! -name shared`"
 
 if [ -d "${ALTSRC}/share/vm/c1" ]; then
   COMPILER1_PATHS="${ALTSRC}/share/vm/c1"
--- a/hotspot/make/windows/makefiles/vm.make	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/make/windows/makefiles/vm.make	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 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
@@ -157,12 +157,11 @@
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/interpreter
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/ci
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/classfile
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parallelScavenge
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/shared
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parNew
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/concurrentMarkSweep
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/g1
-VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_interface
+VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc/parallel
+VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc/shared
+VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc/serial
+VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc/cms
+VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc/g1
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/asm
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/memory
 VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/oops
@@ -233,22 +232,19 @@
 {$(COMMONSRC)\share\vm\classfile}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(COMMONSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
+{$(COMMONSRC)\share\vm\gc\parallel}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(COMMONSRC)\share\vm\gc_implementation\shared}.cpp.obj::
+{$(COMMONSRC)\share\vm\gc\shared}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(COMMONSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
+{$(COMMONSRC)\share\vm\gc\serial}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(COMMONSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
+{$(COMMONSRC)\share\vm\gc\cms}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(COMMONSRC)\share\vm\gc_implementation\g1}.cpp.obj::
-        $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
-
-{$(COMMONSRC)\share\vm\gc_interface}.cpp.obj::
+{$(COMMONSRC)\share\vm\gc\g1}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
 {$(COMMONSRC)\share\vm\asm}.cpp.obj::
@@ -316,22 +312,19 @@
 {$(ALTSRC)\share\vm\classfile}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(ALTSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
+{$(ALTSRC)\share\vm\gc\parallel}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(ALTSRC)\share\vm\gc_implementation\shared}.cpp.obj::
+{$(ALTSRC)\share\vm\gc\shared}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(ALTSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
+{$(ALTSRC)\share\vm\gc\serial}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(ALTSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
+{$(ALTSRC)\share\vm\gc\cms}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
-{$(ALTSRC)\share\vm\gc_implementation\g1}.cpp.obj::
-        $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
-
-{$(ALTSRC)\share\vm\gc_interface}.cpp.obj::
+{$(ALTSRC)\share\vm\gc\g1}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
 
 {$(ALTSRC)\share\vm\asm}.cpp.obj::
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
 // Copyright (c) 2014, Red Hat Inc. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
@@ -758,7 +758,7 @@
 
 source_hpp %{
 
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
 
 class CallStubImpl {
 
--- a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,7 +33,7 @@
 #include "runtime/sharedRuntime.hpp"
 #include "vmreg_aarch64.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif
 
 
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,9 +33,9 @@
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciArrayKlass.hpp"
 #include "ci/ciInstance.hpp"
-#include "gc_interface/collectedHeap.hpp"
-#include "memory/barrierSet.hpp"
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_aarch64.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/cpu/aarch64/vm/c1_MacroAssembler_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_MacroAssembler_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,7 @@
 #include "c1/c1_MacroAssembler.hpp"
 #include "c1/c1_Runtime1.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/markOop.hpp"
--- a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -42,7 +42,7 @@
 #include "runtime/vframeArray.hpp"
 #include "vmreg_aarch64.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif
 
 
--- a/hotspot/src/cpu/aarch64/vm/icBuffer_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/icBuffer_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,7 @@
 #include "asm/macroAssembler.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "code/icBuffer.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_aarch64.hpp"
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Wed May 13 15:16:06 2015 +0200
@@ -41,9 +41,9 @@
 #include "runtime/sharedRuntime.hpp"
 
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,9 +25,9 @@
 
 #include "precompiled.hpp"
 #include "asm/assembler.inline.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
@@ -38,9 +38,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/ppc/vm/icBuffer_ppc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/ppc/vm/icBuffer_ppc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -27,7 +27,7 @@
 #include "asm/assembler.hpp"
 #include "assembler_ppc.inline.hpp"
 #include "code/icBuffer.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_ppc.hpp"
--- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,9 +26,9 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
@@ -40,9 +40,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -33,7 +33,7 @@
 #include "utilities/macros.hpp"
 #include "vmreg_sparc.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #define __ ce->masm()->
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -30,9 +30,9 @@
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciArrayKlass.hpp"
 #include "ci/ciInstance.hpp"
-#include "gc_interface/collectedHeap.hpp"
-#include "memory/barrierSet.hpp"
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_sparc.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,7 +26,7 @@
 #include "c1/c1_MacroAssembler.hpp"
 #include "c1/c1_Runtime1.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/markOop.hpp"
--- a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -37,7 +37,7 @@
 #include "utilities/macros.hpp"
 #include "vmreg_sparc.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif
 
 // Implementation of StubAssembler
--- a/hotspot/src/cpu/sparc/vm/icBuffer_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/icBuffer_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "code/icBuffer.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_sparc.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,9 +25,9 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "prims/methodHandles.hpp"
@@ -39,9 +39,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -25,9 +25,9 @@
 #include "precompiled.hpp"
 #include "asm/assembler.hpp"
 #include "asm/assembler.inline.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
@@ -38,9 +38,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -33,7 +33,7 @@
 #include "utilities/macros.hpp"
 #include "vmreg_x86.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif // INCLUDE_ALL_GCS
 
 
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -32,9 +32,9 @@
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciArrayKlass.hpp"
 #include "ci/ciInstance.hpp"
-#include "gc_interface/collectedHeap.hpp"
-#include "memory/barrierSet.hpp"
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "nativeInst_x86.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,7 +26,7 @@
 #include "c1/c1_MacroAssembler.hpp"
 #include "c1/c1_Runtime1.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/markOop.hpp"
--- a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -39,7 +39,7 @@
 #include "utilities/macros.hpp"
 #include "vmreg_x86.inline.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif
 
 
--- a/hotspot/src/cpu/x86/vm/icBuffer_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/icBuffer_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,7 +26,7 @@
 #include "asm/macroAssembler.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "code/icBuffer.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_x86.hpp"
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,9 +26,9 @@
 #include "asm/assembler.hpp"
 #include "asm/assembler.inline.hpp"
 #include "compiler/disassembler.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "prims/methodHandles.hpp"
@@ -40,9 +40,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef PRODUCT
--- a/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,9 +25,9 @@
 
 #include "precompiled.hpp"
 #include "assembler_zero.inline.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
-#include "memory/cardTableModRefBS.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
@@ -38,9 +38,9 @@
 #include "runtime/stubRoutines.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 int AbstractAssembler::code_fill_byte() {
--- a/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp	Wed May 13 15:16:06 2015 +0200
@@ -27,7 +27,7 @@
 #include "asm/assembler.hpp"
 #include "assembler_zero.inline.hpp"
 #include "code/icBuffer.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "nativeInst_zero.hpp"
--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Wed May 13 15:16:06 2015 +0200
@@ -41,7 +41,7 @@
 #include "code/codeBlob.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "memory/heap.hpp"
 #include "memory/memRegion.hpp"
 #include "memory/universe.hpp"
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Wed May 13 15:16:06 2015 +0200
@@ -41,7 +41,7 @@
 #include "code/codeBlob.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "memory/heap.hpp"
 #include "memory/memRegion.hpp"
 #include "memory/universe.hpp"
--- a/hotspot/src/share/vm/adlc/main.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/adlc/main.cpp	Wed May 13 15:16:06 2015 +0200
@@ -215,7 +215,7 @@
   AD.addInclude(AD._CPP_file, "code/compiledIC.hpp");
   AD.addInclude(AD._CPP_file, "code/nativeInst.hpp");
   AD.addInclude(AD._CPP_file, "code/vmreg.inline.hpp");
-  AD.addInclude(AD._CPP_file, "gc_interface/collectedHeap.inline.hpp");
+  AD.addInclude(AD._CPP_file, "gc/shared/collectedHeap.inline.hpp");
   AD.addInclude(AD._CPP_file, "oops/compiledICHolder.hpp");
   AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
   AD.addInclude(AD._CPP_file, "oops/method.hpp");
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "asm/codeBuffer.hpp"
 #include "compiler/disassembler.hpp"
-#include "memory/gcLocker.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/icache.hpp"
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Wed May 13 15:16:06 2015 +0200
@@ -23,8 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "c1/c1_Compilation.hpp"
 #include "c1/c1_Defs.hpp"
-#include "c1/c1_Compilation.hpp"
 #include "c1/c1_FrameMap.hpp"
 #include "c1/c1_Instruction.hpp"
 #include "c1/c1_LIRAssembler.hpp"
@@ -33,7 +33,7 @@
 #include "ci/ciArrayKlass.hpp"
 #include "ci/ciInstance.hpp"
 #include "ci/ciObjArray.hpp"
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
@@ -41,7 +41,7 @@
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/heapRegion.hpp"
+#include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 
 #ifdef ASSERT
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Wed May 13 15:16:06 2015 +0200
@@ -38,11 +38,11 @@
 #include "code/scopeDesc.hpp"
 #include "code/vtableStubs.hpp"
 #include "compiler/disassembler.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "interpreter/bytecode.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/allocation.inline.hpp"
-#include "memory/barrierSet.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayKlass.hpp"
--- a/hotspot/src/share/vm/ci/ciBaseObject.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciBaseObject.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "ci/ciBaseObject.hpp"
 #include "ci/ciUtilities.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 
 // ------------------------------------------------------------------
 // ciBaseObject::set_ident
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Wed May 13 15:16:06 2015 +0200
@@ -39,7 +39,7 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/compileLog.hpp"
 #include "compiler/compilerOracle.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/oopFactory.hpp"
--- a/hotspot/src/share/vm/ci/ciField.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciField.cpp	Wed May 13 15:16:06 2015 +0200
@@ -27,7 +27,7 @@
 #include "ci/ciInstanceKlass.hpp"
 #include "ci/ciUtilities.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/oop.inline.hpp"
--- a/hotspot/src/share/vm/ci/ciMetadata.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciMetadata.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "ci/ciObject.hpp"
 #include "ci/ciUtilities.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 
 // ------------------------------------------------------------------
 // ciMetadata::print
--- a/hotspot/src/share/vm/ci/ciObject.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciObject.cpp	Wed May 13 15:16:06 2015 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "ci/ciObject.hpp"
 #include "ci/ciUtilities.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "oops/oop.inline.hpp"
 
 // ciObject
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Wed May 13 15:16:06 2015 +0200
@@ -42,13 +42,13 @@
 #include "ci/ciUtilities.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/fieldType.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-# include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+# include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #endif
 
 // ciObjectFactory
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed May 13 15:16:06 2015 +0200
@@ -33,8 +33,8 @@
 #include "classfile/verificationType.hpp"
 #include "classfile/verifier.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "memory/allocation.hpp"
-#include "memory/gcLocker.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/referenceType.hpp"
@@ -59,8 +59,8 @@
 #include "services/classLoadingService.hpp"
 #include "services/threadService.hpp"
 #include "utilities/array.hpp"
+#include "utilities/exceptions.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "utilities/exceptions.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/ostream.hpp"
 #include "utilities/resourceHash.hpp"
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,19 +26,19 @@
 #include "classfile/classFileParser.hpp"
 #include "classfile/classFileStream.hpp"
 #include "classfile/classLoader.hpp"
+#include "classfile/classLoaderData.inline.hpp"
 #include "classfile/classLoaderExt.hpp"
-#include "classfile/classLoaderData.inline.hpp"
 #include "classfile/imageFile.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "compiler/compileBroker.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
+#include "gc/shared/generation.hpp"
 #include "interpreter/bytecodeStream.hpp"
 #include "interpreter/oopMapCache.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
-#include "memory/generation.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/instanceKlass.hpp"
@@ -64,8 +64,8 @@
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_CDS
+#include "classfile/sharedClassUtil.hpp"
 #include "classfile/sharedPathsMiscInfo.hpp"
-#include "classfile/sharedClassUtil.hpp"
 #endif
 
 
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp	Wed May 13 15:16:06 2015 +0200
@@ -53,7 +53,7 @@
 #include "classfile/metadataOnStackMark.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
-#include "memory/gcLocker.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "memory/oopFactory.hpp"
--- a/hotspot/src/share/vm/classfile/stringTable.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp	Wed May 13 15:16:06 2015 +0200
@@ -28,18 +28,18 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
+#include "gc/shared/gcLocker.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
-#include "memory/gcLocker.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
-#include "gc_implementation/g1/g1StringDedup.hpp"
+#include "gc/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc/g1/g1StringDedup.hpp"
 #endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp	Wed May 13 15:16:06 2015 +0200
@@ -28,10 +28,10 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
+#include "gc/shared/gcLocker.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
-#include "memory/gcLocker.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/mutexLocker.hpp"
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Wed May 13 15:16:06 2015 +0200
@@ -34,10 +34,10 @@
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "interpreter/bytecodeStream.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/filemap.hpp"
-#include "memory/gcLocker.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceRefKlass.hpp"
--- a/hotspot/src/share/vm/classfile/verifier.hpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.hpp	Wed May 13 15:16:06 2015 +0200
@@ -26,12 +26,12 @@
 #define SHARE_VM_CLASSFILE_VERIFIER_HPP
 
 #include "classfile/verificationType.hpp"
-#include "memory/gcLocker.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "oops/klass.hpp"
 #include "oops/method.hpp"
 #include "runtime/handles.hpp"
+#include "utilities/exceptions.hpp"
 #include "utilities/growableArray.hpp"
-#include "utilities/exceptions.hpp"
 
 // The verifier class
 class Verifier : AllStatic {
--- a/hotspot/src/share/vm/code/codeCache.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Wed May 13 15:16:06 2015 +0200
@@ -31,22 +31,22 @@
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
 #include "compiler/compileBroker.hpp"
+#include "gc/shared/gcLocker.hpp"
 #include "memory/allocation.inline.hpp"
-#include "memory/gcLocker.hpp"
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/verifyOopClosure.hpp"
+#include "runtime/arguments.hpp"
+#include "runtime/compilationPolicy.hpp"
+#include "runtime/deoptimization.hpp"
 #include "runtime/handles.inline.hpp"
-#include "runtime/arguments.hpp"
-#include "runtime/deoptimization.hpp"
 #include "runtime/icache.hpp"
 #include "runtime/java.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/sweeper.hpp"
-#include "runtime/compilationPolicy.hpp"
 #include "services/memoryService.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/xmlstream.hpp"
--- a/hotspot/src/share/vm/code/icBuffer.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/code/icBuffer.cpp	Wed May 13 15:16:06 2015 +0200
@@ -28,7 +28,7 @@
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
 #include "code/scopeDesc.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "memory/resourceArea.hpp"
--- a/hotspot/src/share/vm/compiler/disassembler.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/compiler/disassembler.cpp	Wed May 13 15:16:06 2015 +0200
@@ -26,8 +26,8 @@
 #include "classfile/javaClasses.hpp"
 #include "code/codeCache.hpp"
 #include "compiler/disassembler.hpp"
-#include "gc_interface/collectedHeap.hpp"
-#include "memory/cardTableModRefBS.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/handles.inline.hpp"
--- a/hotspot/src/share/vm/compiler/oopMap.cpp	Mon May 11 16:30:26 2015 +0200
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp	Wed May 13 15:16:06 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -28,7 +28,7 @@
 #include "code/nmethod.hpp"
 #include "code/scopeDesc.hpp"
 #include "compiler/oopMap.hpp"
-#include "gc_interface/collectedHeap.hpp"
+#include "gc/shared/collectedHeap.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/frame.inline.hpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/adaptiveFreeList.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/adaptiveFreeList.hpp"
+#include "gc/cms/freeChunk.hpp"
+#include "gc/shared/collectedHeap.hpp"
+#include "memory/freeBlockDictionary.hpp"
+#include "runtime/globals.hpp"
+#include "runtime/mutex.hpp"
+#include "runtime/orderAccess.inline.hpp"
+#include "runtime/vmThread.hpp"
+
+template <>
+void AdaptiveFreeList<FreeChunk>::print_on(outputStream* st, const char* c) const {
+  if (c != NULL) {
+    st->print("%16s", c);
+  } else {
+    st->print(SIZE_FORMAT_W(16), size());
+  }
+  st->print("\t"
+           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t"
+           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\n",
+           bfr_surp(),             surplus(),             desired(),             prev_sweep(),           before_sweep(),
+           count(),               coal_births(),          coal_deaths(),          split_births(),         split_deaths());
+}
+
+template <class Chunk>
+AdaptiveFreeList<Chunk>::AdaptiveFreeList() : FreeList<Chunk>(), _hint(0) {
+  init_statistics();
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::initialize() {
+  FreeList<Chunk>::initialize();
+  set_hint(0);
+  init_statistics(true /* split_birth */);
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::reset(size_t hint) {
+  FreeList<Chunk>::reset();
+  set_hint(hint);
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::init_statistics(bool split_birth) {
+  _allocation_stats.initialize(split_birth);
+}
+
+template <class Chunk>
+size_t AdaptiveFreeList<Chunk>::get_better_size() {
+
+  // A candidate chunk has been found.  If it is already under
+  // populated and there is a hinT, REturn the hint().  Else
+  // return the size of this chunk.
+  if (surplus() <= 0) {
+    if (hint() != 0) {
+      return hint();
+    } else {
+      return size();
+    }
+  } else {
+    // This list has a surplus so use it.
+    return size();
+  }
+}
+
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::return_chunk_at_head(Chunk* chunk) {
+  assert_proper_lock_protection();
+  return_chunk_at_head(chunk, true);
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::return_chunk_at_head(Chunk* chunk, bool record_return) {
+  FreeList<Chunk>::return_chunk_at_head(chunk, record_return);
+#ifdef ASSERT
+  if (record_return) {
+    increment_returned_bytes_by(size()*HeapWordSize);
+  }
+#endif
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::return_chunk_at_tail(Chunk* chunk) {
+  AdaptiveFreeList<Chunk>::return_chunk_at_tail(chunk, true);
+}
+
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::return_chunk_at_tail(Chunk* chunk, bool record_return) {
+  FreeList<Chunk>::return_chunk_at_tail(chunk, record_return);
+#ifdef ASSERT
+  if (record_return) {
+    increment_returned_bytes_by(size()*HeapWordSize);
+  }
+#endif
+}
+
+#ifndef PRODUCT
+template <class Chunk>
+void AdaptiveFreeList<Chunk>::verify_stats() const {
+  // The +1 of the LH comparand is to allow some "looseness" in
+  // checking: we usually call this interface when adding a block
+  // and we'll subsequently update the stats; we cannot update the
+  // stats beforehand because in the case of the large-block BT
+  // dictionary for example, this might be the first block and
+  // in that case there would be no place that we could record
+  // the stats (which are kept in the block itself).
+  assert((_allocation_stats.prev_sweep() + _allocation_stats.split_births()
+          + _allocation_stats.coal_births() + 1)   // Total Production Stock + 1
+         >= (_allocation_stats.split_deaths() + _allocation_stats.coal_deaths()
+             + (ssize_t)count()),                // Total Current Stock + depletion
+         err_msg("FreeList " PTR_FORMAT " of size " SIZE_FORMAT
+                 " violates Conservation Principle: "
+                 "prev_sweep(" SIZE_FORMAT ")"
+                 " + split_births(" SIZE_FORMAT ")"
+                 " + coal_births(" SIZE_FORMAT ") + 1 >= "
+                 " split_deaths(" SIZE_FORMAT ")"
+                 " coal_deaths(" SIZE_FORMAT ")"
+                 " + count(" SSIZE_FORMAT ")",
+                 p2i(this), size(), _allocation_stats.prev_sweep(), _allocation_stats.split_births(),
+                 _allocation_stats.coal_births(), _allocation_stats.split_deaths(),
+                 _allocation_stats.coal_deaths(), count()));
+}
+#endif
+
+// Needs to be after the definitions have been seen.
+template class AdaptiveFreeList<FreeChunk>;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/adaptiveFreeList.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2001, 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_ADAPTIVEFREELIST_HPP
+#define SHARE_VM_GC_CMS_ADAPTIVEFREELIST_HPP
+
+#include "gc/cms/allocationStats.hpp"
+#include "memory/freeList.hpp"
+
+class CompactibleFreeListSpace;
+
+// A class for maintaining a free list of Chunk's.  The FreeList
+// maintains a the structure of the list (head, tail, etc.) plus
+// statistics for allocations from the list.  The links between items
+// are not part of FreeList.  The statistics are
+// used to make decisions about coalescing Chunk's when they
+// are swept during collection.
+//
+// See the corresponding .cpp file for a description of the specifics
+// for that implementation.
+
+class Mutex;
+
+template <class Chunk>
+class AdaptiveFreeList : public FreeList<Chunk> {
+  friend class CompactibleFreeListSpace;
+  friend class VMStructs;
+  // friend class PrintTreeCensusClosure<Chunk, FreeList_t>;
+
+  size_t        _hint;          // next larger size list with a positive surplus
+
+  AllocationStats _allocation_stats; // allocation-related statistics
+
+ public:
+
+  AdaptiveFreeList();
+
+  using FreeList<Chunk>::assert_proper_lock_protection;
+#ifdef ASSERT
+  using FreeList<Chunk>::protecting_lock;
+#endif
+  using FreeList<Chunk>::count;
+  using FreeList<Chunk>::size;
+  using FreeList<Chunk>::verify_chunk_in_free_list;
+  using FreeList<Chunk>::getFirstNChunksFromList;
+  using FreeList<Chunk>::print_on;
+  void return_chunk_at_head(Chunk* fc, bool record_return);
+  void return_chunk_at_head(Chunk* fc);
+  void return_chunk_at_tail(Chunk* fc, bool record_return);
+  void return_chunk_at_tail(Chunk* fc);
+  using FreeList<Chunk>::return_chunk_at_tail;
+  using FreeList<Chunk>::remove_chunk;
+  using FreeList<Chunk>::prepend;
+  using FreeList<Chunk>::print_labels_on;
+  using FreeList<Chunk>::get_chunk_at_head;
+
+  // Initialize.
+  void initialize();
+
+  // Reset the head, tail, hint, and count of a free list.
+  void reset(size_t hint);
+
+  void print_on(outputStream* st, const char* c = NULL) const;
+
+  size_t hint() const {
+    return _hint;
+  }
+  void set_hint(size_t v) {
+    assert_proper_lock_protection();
+    assert(v == 0 || size() < v, "Bad hint");
+    _hint = v;
+  }
+
+  size_t get_better_size();
+
+  // Accessors for statistics
+  void init_statistics(bool split_birth = false);
+
+  AllocationStats* allocation_stats() {
+    assert_proper_lock_protection();
+    return &_allocation_stats;
+  }
+
+  ssize_t desired() const {
+    return _allocation_stats.desired();
+  }
+  void set_desired(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_desired(v);
+  }
+  void compute_desired(float inter_sweep_current,
+                       float inter_sweep_estimate,
+                       float intra_sweep_estimate) {
+    assert_proper_lock_protection();
+    _allocation_stats.compute_desired(count(),
+                                      inter_sweep_current,
+                                      inter_sweep_estimate,
+                                      intra_sweep_estimate);
+  }
+  ssize_t coal_desired() const {
+    return _allocation_stats.coal_desired();
+  }
+  void set_coal_desired(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_coal_desired(v);
+  }
+
+  ssize_t surplus() const {
+    return _allocation_stats.surplus();
+  }
+  void set_surplus(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_surplus(v);
+  }
+  void increment_surplus() {
+    assert_proper_lock_protection();
+    _allocation_stats.increment_surplus();
+  }
+  void decrement_surplus() {
+    assert_proper_lock_protection();
+    _allocation_stats.decrement_surplus();
+  }
+
+  ssize_t bfr_surp() const {
+    return _allocation_stats.bfr_surp();
+  }
+  void set_bfr_surp(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_bfr_surp(v);
+  }
+  ssize_t prev_sweep() const {
+    return _allocation_stats.prev_sweep();
+  }
+  void set_prev_sweep(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_prev_sweep(v);
+  }
+  ssize_t before_sweep() const {
+    return _allocation_stats.before_sweep();
+  }
+  void set_before_sweep(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_before_sweep(v);
+  }
+
+  ssize_t coal_births() const {
+    return _allocation_stats.coal_births();
+  }
+  void set_coal_births(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_coal_births(v);
+  }
+  void increment_coal_births() {
+    assert_proper_lock_protection();
+    _allocation_stats.increment_coal_births();
+  }
+
+  ssize_t coal_deaths() const {
+    return _allocation_stats.coal_deaths();
+  }
+  void set_coal_deaths(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_coal_deaths(v);
+  }
+  void increment_coal_deaths() {
+    assert_proper_lock_protection();
+    _allocation_stats.increment_coal_deaths();
+  }
+
+  ssize_t split_births() const {
+    return _allocation_stats.split_births();
+  }
+  void set_split_births(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_split_births(v);
+  }
+  void increment_split_births() {
+    assert_proper_lock_protection();
+    _allocation_stats.increment_split_births();
+  }
+
+  ssize_t split_deaths() const {
+    return _allocation_stats.split_deaths();
+  }
+  void set_split_deaths(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_split_deaths(v);
+  }
+  void increment_split_deaths() {
+    assert_proper_lock_protection();
+    _allocation_stats.increment_split_deaths();
+  }
+
+#ifndef PRODUCT
+  // For debugging.  The "_returned_bytes" in all the lists are summed
+  // and compared with the total number of bytes swept during a
+  // collection.
+  size_t returned_bytes() const { return _allocation_stats.returned_bytes(); }
+  void set_returned_bytes(size_t v) { _allocation_stats.set_returned_bytes(v); }
+  void increment_returned_bytes_by(size_t v) {
+    _allocation_stats.set_returned_bytes(_allocation_stats.returned_bytes() + v);
+  }
+  // Stats verification
+  void verify_stats() const;
+#endif  // NOT PRODUCT
+};
+
+#endif // SHARE_VM_GC_CMS_ADAPTIVEFREELIST_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/allocationStats.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/allocationStats.hpp"
+#include "utilities/macros.hpp"
+#include "utilities/ostream.hpp"
+
+// Technically this should be derived from machine speed, and
+// ideally it would be dynamically adjusted.
+float AllocationStats::_threshold = ((float)CMS_SweepTimerThresholdMillis)/1000;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/allocationStats.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2001, 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
+#define SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
+
+#include "gc/shared/gcUtil.hpp"
+#include "memory/allocation.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "utilities/macros.hpp"
+
+class AllocationStats VALUE_OBJ_CLASS_SPEC {
+  // A duration threshold (in ms) used to filter
+  // possibly unreliable samples.
+  static float _threshold;
+
+  // We measure the demand between the end of the previous sweep and
+  // beginning of this sweep:
+  //   Count(end_last_sweep) - Count(start_this_sweep)
+  //     + split_births(between) - split_deaths(between)
+  // The above number divided by the time since the end of the
+  // previous sweep gives us a time rate of demand for blocks
+  // of this size. We compute a padded average of this rate as
+  // our current estimate for the time rate of demand for blocks
+  // of this size. Similarly, we keep a padded average for the time
+  // between sweeps. Our current estimate for demand for blocks of
+  // this size is then simply computed as the product of these two
+  // estimates.
+  AdaptivePaddedAverage _demand_rate_estimate;
+
+  ssize_t     _desired;          // Demand estimate computed as described above
+  ssize_t     _coal_desired;     // desired +/- small-percent for tuning coalescing
+
+  ssize_t     _surplus;          // count - (desired +/- small-percent),
+                                 // used to tune splitting in best fit
+  ssize_t     _bfr_surp;         // surplus at start of current sweep
+  ssize_t     _prev_sweep;       // count from end of previous sweep
+  ssize_t     _before_sweep;     // count from before current sweep
+  ssize_t     _coal_births;      // additional chunks from coalescing
+  ssize_t     _coal_deaths;      // loss from coalescing
+  ssize_t     _split_births;     // additional chunks from splitting
+  ssize_t     _split_deaths;     // loss from splitting
+  size_t      _returned_bytes;   // number of bytes returned to list.
+ public:
+  void initialize(bool split_birth = false) {
+    AdaptivePaddedAverage* dummy =
+      new (&_demand_rate_estimate) AdaptivePaddedAverage(CMS_FLSWeight,
+                                                         CMS_FLSPadding);
+    _desired = 0;
+    _coal_desired = 0;
+    _surplus = 0;
+    _bfr_surp = 0;
+    _prev_sweep = 0;
+    _before_sweep = 0;
+    _coal_births = 0;
+    _coal_deaths = 0;
+    _split_births = (split_birth ? 1 : 0);
+    _split_deaths = 0;
+    _returned_bytes = 0;
+  }
+
+  AllocationStats() {
+    initialize();
+  }
+
+  // The rate estimate is in blocks per second.
+  void compute_desired(size_t count,
+                       float inter_sweep_current,
+                       float inter_sweep_estimate,
+                       float intra_sweep_estimate) {
+    // If the latest inter-sweep time is below our granularity
+    // of measurement, we may call in here with
+    // inter_sweep_current == 0. However, even for suitably small
+    // but non-zero inter-sweep durations, we may not trust the accuracy
+    // of accumulated data, since it has not been "integrated"
+    // (read "low-pass-filtered") long enough, and would be
+    // vulnerable to noisy glitches. In such cases, we
+    // ignore the current sample and use currently available
+    // historical estimates.
+    assert(prev_sweep() + split_births() + coal_births()        // "Total Production Stock"
+           >= split_deaths() + coal_deaths() + (ssize_t)count, // "Current stock + depletion"
+           "Conservation Principle");
+    if (inter_sweep_current > _threshold) {
+      ssize_t demand = prev_sweep() - (ssize_t)count + split_births() + coal_births()
+                       - split_deaths() - coal_deaths();
+      assert(demand >= 0,
+             err_msg("Demand (" SSIZE_FORMAT ") should be non-negative for "
+                     PTR_FORMAT " (size=" SIZE_FORMAT ")",
+                     demand, p2i(this), count));
+      // Defensive: adjust for imprecision in event counting
+      if (demand < 0) {
+        demand = 0;
+      }
+      float old_rate = _demand_rate_estimate.padded_average();
+      float rate = ((float)demand)/inter_sweep_current;
+      _demand_rate_estimate.sample(rate);
+      float new_rate = _demand_rate_estimate.padded_average();
+      ssize_t old_desired = _desired;
+      float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0);
+      _desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise));
+      if (PrintFLSStatistics > 1) {
+        gclog_or_tty->print_cr("demand: " SSIZE_FORMAT ", old_rate: %f, current_rate: %f, "
+                               "new_rate: %f, old_desired: " SSIZE_FORMAT ", new_desired: " SSIZE_FORMAT,
+                                demand, old_rate, rate, new_rate, old_desired, _desired);
+      }
+    }
+  }
+
+  ssize_t desired() const { return _desired; }
+  void set_desired(ssize_t v) { _desired = v; }
+
+  ssize_t coal_desired() const { return _coal_desired; }
+  void set_coal_desired(ssize_t v) { _coal_desired = v; }
+
+  ssize_t surplus() const { return _surplus; }
+  void set_surplus(ssize_t v) { _surplus = v; }
+  void increment_surplus() { _surplus++; }
+  void decrement_surplus() { _surplus--; }
+
+  ssize_t bfr_surp() const { return _bfr_surp; }
+  void set_bfr_surp(ssize_t v) { _bfr_surp = v; }
+  ssize_t prev_sweep() const { return _prev_sweep; }
+  void set_prev_sweep(ssize_t v) { _prev_sweep = v; }
+  ssize_t before_sweep() const { return _before_sweep; }
+  void set_before_sweep(ssize_t v) { _before_sweep = v; }
+
+  ssize_t coal_births() const { return _coal_births; }
+  void set_coal_births(ssize_t v) { _coal_births = v; }
+  void increment_coal_births() { _coal_births++; }
+
+  ssize_t coal_deaths() const { return _coal_deaths; }
+  void set_coal_deaths(ssize_t v) { _coal_deaths = v; }
+  void increment_coal_deaths() { _coal_deaths++; }
+
+  ssize_t split_births() const { return _split_births; }
+  void set_split_births(ssize_t v) { _split_births = v; }
+  void increment_split_births() { _split_births++; }
+
+  ssize_t split_deaths() const { return _split_deaths; }
+  void set_split_deaths(ssize_t v) { _split_deaths = v; }
+  void increment_split_deaths() { _split_deaths++; }
+
+  NOT_PRODUCT(
+    size_t returned_bytes() const { return _returned_bytes; }
+    void set_returned_bytes(size_t v) { _returned_bytes = v; }
+  )
+};
+
+#endif // SHARE_VM_GC_CMS_ALLOCATIONSTATS_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsCollectorPolicy.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/cmsCollectorPolicy.hpp"
+#include "gc/cms/parNewGeneration.hpp"
+#include "gc/shared/adaptiveSizePolicy.hpp"
+#include "gc/shared/cardTableRS.hpp"
+#include "gc/shared/collectorPolicy.hpp"
+#include "gc/shared/gcLocker.inline.hpp"
+#include "gc/shared/gcPolicyCounters.hpp"
+#include "gc/shared/genCollectedHeap.hpp"
+#include "gc/shared/generationSpec.hpp"
+#include "gc/shared/space.hpp"
+#include "gc/shared/vmGCOperations.hpp"
+#include "memory/universe.hpp"
+#include "runtime/arguments.hpp"
+#include "runtime/globals_extension.hpp"
+#include "runtime/handles.inline.hpp"
+#include "runtime/java.hpp"
+#include "runtime/thread.inline.hpp"
+#include "runtime/vmThread.hpp"
+
+//
+// ConcurrentMarkSweepPolicy methods
+//
+
+void ConcurrentMarkSweepPolicy::initialize_alignments() {
+  _space_alignment = _gen_alignment = (uintx)Generation::GenGrain;
+  _heap_alignment = compute_heap_alignment();
+}
+
+void ConcurrentMarkSweepPolicy::initialize_generations() {
+  _young_gen_spec = new GenerationSpec(Generation::ParNew, _initial_young_size,
+                                       _max_young_size, _gen_alignment);
+  _old_gen_spec   = new GenerationSpec(Generation::ConcurrentMarkSweep,
+                                       _initial_old_size, _max_old_size, _gen_alignment);
+}
+
+void ConcurrentMarkSweepPolicy::initialize_size_policy(size_t init_eden_size,
+                                               size_t init_promo_size,
+                                               size_t init_survivor_size) {
+  double max_gc_pause_sec = ((double) MaxGCPauseMillis)/1000.0;
+  _size_policy = new AdaptiveSizePolicy(init_eden_size,
+                                        init_promo_size,
+                                        init_survivor_size,
+                                        max_gc_pause_sec,
+                                        GCTimeRatio);
+}
+
+void ConcurrentMarkSweepPolicy::initialize_gc_policy_counters() {
+  // initialize the policy counters - 2 collectors, 3 generations
+  _gc_policy_counters = new GCPolicyCounters("ParNew:CMS", 2, 3);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsCollectorPolicy.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_CMSCOLLECTORPOLICY_HPP
+#define SHARE_VM_GC_CMS_CMSCOLLECTORPOLICY_HPP
+
+#include "gc/shared/collectorPolicy.hpp"
+
+class ConcurrentMarkSweepPolicy : public GenCollectorPolicy {
+ protected:
+  void initialize_alignments();
+  void initialize_generations();
+
+ public:
+  ConcurrentMarkSweepPolicy() {}
+
+  ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return this; }
+
+  void initialize_gc_policy_counters();
+
+  virtual void initialize_size_policy(size_t init_eden_size,
+                                      size_t init_promo_size,
+                                      size_t init_survivor_size);
+};
+
+#endif // SHARE_VM_GC_CMS_CMSCOLLECTORPOLICY_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsLockVerifier.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/cmsLockVerifier.hpp"
+#include "gc/cms/concurrentMarkSweepThread.hpp"
+#include "runtime/vmThread.hpp"
+
+///////////// Locking verification specific to CMS //////////////
+// Much like "assert_lock_strong()", except that it relaxes the
+// assertion somewhat for the parallel GC case, where VM thread
+// or the CMS thread might hold the lock on behalf of the parallel
+// threads. The second argument is in support of an extra locking
+// check for CFL spaces' free list locks.
+#ifndef PRODUCT
+void CMSLockVerifier::assert_locked(const Mutex* lock,
+                                    const Mutex* p_lock1,
+                                    const Mutex* p_lock2) {
+  if (!Universe::is_fully_initialized()) {
+    return;
+  }
+
+  Thread* myThread = Thread::current();
+
+  if (lock == NULL) { // a "lock-free" structure, e.g. MUT, protected by CMS token
+    assert(p_lock1 == NULL && p_lock2 == NULL, "Unexpected caller error");
+    if (myThread->is_ConcurrentGC_thread()) {
+      // This test might have to change in the future, if there can be
+      // multiple peer CMS threads.  But for now, if we're testing the CMS
+      assert(myThread == ConcurrentMarkSweepThread::cmst(),
+             "In CMS, CMS thread is the only Conc GC thread.");
+      assert(ConcurrentMarkSweepThread::cms_thread_has_cms_token(),
+             "CMS thread should have CMS token");
+    } else if (myThread->is_VM_thread()) {
+      assert(ConcurrentMarkSweepThread::vm_thread_has_cms_token(),
+             "VM thread should have CMS token");
+    } else {
+      // Token should be held on our behalf by one of the other
+      // of CMS or VM thread; not enough easily testable
+      // state info to test which here.
+      assert(myThread->is_GC_task_thread(), "Unexpected thread type");
+    }
+    return;
+  }
+
+  if (myThread->is_VM_thread()
+      || myThread->is_ConcurrentGC_thread()
+      || myThread->is_Java_thread()) {
+    // Make sure that we are holding the associated lock.
+    assert_lock_strong(lock);
+    // The checking of p_lock is a spl case for CFLS' free list
+    // locks: we make sure that none of the parallel GC work gang
+    // threads are holding "sub-locks" of freeListLock(). We check only
+    // the parDictionaryAllocLock because the others are too numerous.
+    // This spl case code is somewhat ugly and any improvements
+    // are welcome.
+    assert(p_lock1 == NULL || !p_lock1->is_locked() || p_lock1->owned_by_self(),
+           "Possible race between this and parallel GC threads");
+    assert(p_lock2 == NULL || !p_lock2->is_locked() || p_lock2->owned_by_self(),
+           "Possible race between this and parallel GC threads");
+  } else if (myThread->is_GC_task_thread()) {
+    // Make sure that the VM or CMS thread holds lock on our behalf
+    // XXX If there were a concept of a gang_master for a (set of)
+    // gang_workers, we could have used the identity of that thread
+    // for checking ownership here; for now we just disjunct.
+    assert(lock->owner() == VMThread::vm_thread() ||
+           lock->owner() == ConcurrentMarkSweepThread::cmst(),
+           "Should be locked by VM thread or CMS thread on my behalf");
+    if (p_lock1 != NULL) {
+      assert_lock_strong(p_lock1);
+    }
+    if (p_lock2 != NULL) {
+      assert_lock_strong(p_lock2);
+    }
+  } else {
+    // Make sure we didn't miss some other thread type calling into here;
+    // perhaps as a result of future VM evolution.
+    ShouldNotReachHere();
+  }
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsLockVerifier.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_CMSLOCKVERIFIER_HPP
+#define SHARE_VM_GC_CMS_CMSLOCKVERIFIER_HPP
+
+#include "runtime/mutex.hpp"
+
+///////////// Locking verification specific to CMS //////////////
+// Much like "assert_lock_strong()", except
+// that it relaxes the assertion somewhat for the parallel GC case, where
+// main GC thread or the CMS thread might hold the lock on behalf of
+// the parallel threads.
+class CMSLockVerifier: AllStatic {
+ public:
+  static void assert_locked(const Mutex* lock, const Mutex* p_lock1, const Mutex* p_lock2)
+    PRODUCT_RETURN;
+  static void assert_locked(const Mutex* lock, const Mutex* p_lock) {
+    assert_locked(lock, p_lock, NULL);
+  }
+  static void assert_locked(const Mutex* lock) {
+    assert_locked(lock, NULL);
+  }
+};
+
+#endif // SHARE_VM_GC_CMS_CMSLOCKVERIFIER_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsOopClosures.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/cmsOopClosures.inline.hpp"
+#include "gc/shared/specialized_oop_closures.hpp"
+#include "memory/iterator.inline.hpp"
+
+// Generate CMS specialized oop_oop_iterate functions.
+SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_CMS(ALL_KLASS_OOP_OOP_ITERATE_DEFN)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,362 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
+#define SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
+
+#include "gc/shared/genOopClosures.hpp"
+#include "memory/iterator.hpp"
+
+/////////////////////////////////////////////////////////////////
+// Closures used by ConcurrentMarkSweepGeneration's collector
+/////////////////////////////////////////////////////////////////
+class ConcurrentMarkSweepGeneration;
+class CMSBitMap;
+class CMSMarkStack;
+class CMSCollector;
+class MarkFromRootsClosure;
+class Par_MarkFromRootsClosure;
+
+// Decode the oop and call do_oop on it.
+#define DO_OOP_WORK_DEFN \
+  void do_oop(oop obj);                                   \
+  template <class T> inline void do_oop_work(T* p) {      \
+    T heap_oop = oopDesc::load_heap_oop(p);               \
+    if (!oopDesc::is_null(heap_oop)) {                    \
+      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);       \
+      do_oop(obj);                                        \
+    }                                                     \
+  }
+
+// TODO: This duplication of the MetadataAwareOopClosure class is only needed
+//       because some CMS OopClosures derive from OopsInGenClosure. It would be
+//       good to get rid of them completely.
+class MetadataAwareOopsInGenClosure: public OopsInGenClosure {
+  KlassToOopClosure _klass_closure;
+ public:
+  MetadataAwareOopsInGenClosure() {
+    _klass_closure.initialize(this);
+  }
+
+  virtual bool do_metadata()    { return do_metadata_nv(); }
+  inline  bool do_metadata_nv() { return true; }
+
+  virtual void do_klass(Klass* k);
+  void do_klass_nv(Klass* k);
+
+  virtual void do_class_loader_data(ClassLoaderData* cld);
+};
+
+class MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
+ private:
+  const MemRegion _span;
+  CMSBitMap*      _bitMap;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+};
+
+class Par_MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
+ private:
+  const MemRegion _span;
+  CMSBitMap*      _bitMap;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  Par_MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+};
+
+// A variant of the above used in certain kinds of CMS
+// marking verification.
+class MarkRefsIntoVerifyClosure: public MetadataAwareOopsInGenClosure {
+ private:
+  const MemRegion _span;
+  CMSBitMap*      _verification_bm;
+  CMSBitMap*      _cms_bm;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  MarkRefsIntoVerifyClosure(MemRegion span, CMSBitMap* verification_bm,
+                            CMSBitMap* cms_bm);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+};
+
+// The non-parallel version (the parallel version appears further below).
+class PushAndMarkClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector* _collector;
+  MemRegion     _span;
+  CMSBitMap*    _bit_map;
+  CMSBitMap*    _mod_union_table;
+  CMSMarkStack* _mark_stack;
+  bool          _concurrent_precleaning;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  PushAndMarkClosure(CMSCollector* collector,
+                     MemRegion span,
+                     ReferenceProcessor* rp,
+                     CMSBitMap* bit_map,
+                     CMSBitMap* mod_union_table,
+                     CMSMarkStack* mark_stack,
+                     bool concurrent_precleaning);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { PushAndMarkClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { PushAndMarkClosure::do_oop_work(p); }
+};
+
+// In the parallel case, the bit map and the
+// reference processor are currently all shared. Access to
+// these shared mutable structures must use appropriate
+// synchronization (for instance, via CAS). The marking stack
+// used in the non-parallel case above is here replaced with
+// an OopTaskQueue structure to allow efficient work stealing.
+class Par_PushAndMarkClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector* _collector;
+  MemRegion     _span;
+  CMSBitMap*    _bit_map;
+  OopTaskQueue* _work_queue;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  Par_PushAndMarkClosure(CMSCollector* collector,
+                         MemRegion span,
+                         ReferenceProcessor* rp,
+                         CMSBitMap* bit_map,
+                         OopTaskQueue* work_queue);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { Par_PushAndMarkClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { Par_PushAndMarkClosure::do_oop_work(p); }
+};
+
+// The non-parallel version (the parallel version appears further below).
+class MarkRefsIntoAndScanClosure: public MetadataAwareOopsInGenClosure {
+ private:
+  MemRegion          _span;
+  CMSBitMap*         _bit_map;
+  CMSMarkStack*      _mark_stack;
+  PushAndMarkClosure _pushAndMarkClosure;
+  CMSCollector*      _collector;
+  Mutex*             _freelistLock;
+  bool               _yield;
+  // Whether closure is being used for concurrent precleaning
+  bool               _concurrent_precleaning;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  MarkRefsIntoAndScanClosure(MemRegion span,
+                             ReferenceProcessor* rp,
+                             CMSBitMap* bit_map,
+                             CMSBitMap* mod_union_table,
+                             CMSMarkStack* mark_stack,
+                             CMSCollector* collector,
+                             bool should_yield,
+                             bool concurrent_precleaning);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { MarkRefsIntoAndScanClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { MarkRefsIntoAndScanClosure::do_oop_work(p); }
+
+  void set_freelistLock(Mutex* m) {
+    _freelistLock = m;
+  }
+
+ private:
+  inline void do_yield_check();
+  void do_yield_work();
+  bool take_from_overflow_list();
+};
+
+// In this, the parallel avatar of MarkRefsIntoAndScanClosure, the revisit
+// stack and the bitMap are shared, so access needs to be suitably
+// synchronized. An OopTaskQueue structure, supporting efficient
+// work stealing, replaces a CMSMarkStack for storing grey objects.
+class Par_MarkRefsIntoAndScanClosure: public MetadataAwareOopsInGenClosure {
+ private:
+  MemRegion              _span;
+  CMSBitMap*             _bit_map;
+  OopTaskQueue*          _work_queue;
+  const uint             _low_water_mark;
+  Par_PushAndMarkClosure _par_pushAndMarkClosure;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  Par_MarkRefsIntoAndScanClosure(CMSCollector* collector,
+                                 MemRegion span,
+                                 ReferenceProcessor* rp,
+                                 CMSBitMap* bit_map,
+                                 OopTaskQueue* work_queue);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); }
+
+  void trim_queue(uint size);
+};
+
+// This closure is used during the concurrent marking phase
+// following the first checkpoint. Its use is buried in
+// the closure MarkFromRootsClosure.
+class PushOrMarkClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector*   _collector;
+  MemRegion       _span;
+  CMSBitMap*      _bitMap;
+  CMSMarkStack*   _markStack;
+  HeapWord* const _finger;
+  MarkFromRootsClosure* const
+                  _parent;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  PushOrMarkClosure(CMSCollector* cms_collector,
+                    MemRegion span,
+                    CMSBitMap* bitMap,
+                    CMSMarkStack* markStack,
+                    HeapWord* finger,
+                    MarkFromRootsClosure* parent);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { PushOrMarkClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { PushOrMarkClosure::do_oop_work(p); }
+
+  // Deal with a stack overflow condition
+  void handle_stack_overflow(HeapWord* lost);
+ private:
+  inline void do_yield_check();
+};
+
+// A parallel (MT) version of the above.
+// This closure is used during the concurrent marking phase
+// following the first checkpoint. Its use is buried in
+// the closure Par_MarkFromRootsClosure.
+class Par_PushOrMarkClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector*    _collector;
+  MemRegion        _whole_span;
+  MemRegion        _span;        // local chunk
+  CMSBitMap*       _bit_map;
+  OopTaskQueue*    _work_queue;
+  CMSMarkStack*    _overflow_stack;
+  HeapWord*  const _finger;
+  HeapWord** const _global_finger_addr;
+  Par_MarkFromRootsClosure* const
+                   _parent;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  Par_PushOrMarkClosure(CMSCollector* cms_collector,
+                        MemRegion span,
+                        CMSBitMap* bit_map,
+                        OopTaskQueue* work_queue,
+                        CMSMarkStack* mark_stack,
+                        HeapWord* finger,
+                        HeapWord** global_finger_addr,
+                        Par_MarkFromRootsClosure* parent);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { Par_PushOrMarkClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { Par_PushOrMarkClosure::do_oop_work(p); }
+
+  // Deal with a stack overflow condition
+  void handle_stack_overflow(HeapWord* lost);
+ private:
+  inline void do_yield_check();
+};
+
+// For objects in CMS generation, this closure marks
+// given objects (transitively) as being reachable/live.
+// This is currently used during the (weak) reference object
+// processing phase of the CMS final checkpoint step, as
+// well as during the concurrent precleaning of the discovered
+// reference lists.
+class CMSKeepAliveClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector* _collector;
+  const MemRegion _span;
+  CMSMarkStack* _mark_stack;
+  CMSBitMap*    _bit_map;
+  bool          _concurrent_precleaning;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  CMSKeepAliveClosure(CMSCollector* collector, MemRegion span,
+                      CMSBitMap* bit_map, CMSMarkStack* mark_stack,
+                      bool cpc);
+  bool    concurrent_precleaning() const { return _concurrent_precleaning; }
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { CMSKeepAliveClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { CMSKeepAliveClosure::do_oop_work(p); }
+};
+
+class CMSInnerParMarkAndPushClosure: public MetadataAwareOopClosure {
+ private:
+  CMSCollector* _collector;
+  MemRegion     _span;
+  OopTaskQueue* _work_queue;
+  CMSBitMap*    _bit_map;
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  CMSInnerParMarkAndPushClosure(CMSCollector* collector,
+                                MemRegion span, CMSBitMap* bit_map,
+                                OopTaskQueue* work_queue);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  inline void do_oop_nv(oop* p)       { CMSInnerParMarkAndPushClosure::do_oop_work(p); }
+  inline void do_oop_nv(narrowOop* p) { CMSInnerParMarkAndPushClosure::do_oop_work(p); }
+};
+
+// A parallel (MT) version of the above, used when
+// reference processing is parallel; the only difference
+// is in the do_oop method.
+class CMSParKeepAliveClosure: public MetadataAwareOopClosure {
+ private:
+  MemRegion     _span;
+  OopTaskQueue* _work_queue;
+  CMSBitMap*    _bit_map;
+  CMSInnerParMarkAndPushClosure
+                _mark_and_push;
+  const uint    _low_water_mark;
+  void trim_queue(uint max);
+ protected:
+  DO_OOP_WORK_DEFN
+ public:
+  CMSParKeepAliveClosure(CMSCollector* collector, MemRegion span,
+                         CMSBitMap* bit_map, OopTaskQueue* work_queue);
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+};
+
+#endif // SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/cmsOopClosures.inline.hpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_CMS_CMSOOPCLOSURES_INLINE_HPP
+#define SHARE_VM_GC_CMS_CMSOOPCLOSURES_INLINE_HPP
+
+#include "gc/cms/cmsOopClosures.hpp"
+#include "gc/cms/concurrentMarkSweepGeneration.hpp"
+#include "gc/shared/taskqueue.inline.hpp"
+#include "oops/oop.inline.hpp"
+
+// Trim our work_queue so its length is below max at return
+inline void Par_MarkRefsIntoAndScanClosure::trim_queue(uint max) {
+  while (_work_queue->size() > max) {
+    oop newOop;
+    if (_work_queue->pop_local(newOop)) {
+      assert(newOop->is_oop(), "Expected an oop");
+      assert(_bit_map->isMarked((HeapWord*)newOop),
+             "only grey objects on this stack");
+      // iterate over the oops in this oop, marking and pushing
+      // the ones in CMS heap (i.e. in _span).
+      newOop->oop_iterate(&_par_pushAndMarkClosure);
+    }
+  }
+}
+
+// MetadataAwareOopClosure and MetadataAwareOopsInGenClosure are duplicated,
+// until we get rid of OopsInGenClosure.
+
+inline void MetadataAwareOopsInGenClosure::do_klass_nv(Klass* k) {
+  ClassLoaderData* cld = k->class_loader_data();
+  do_class_loader_data(cld);
+}
+inline void MetadataAwareOopsInGenClosure::do_klass(Klass* k) { do_klass_nv(k); }
+
+inline void MetadataAwareOopsInGenClosure::do_class_loader_data(ClassLoaderData* cld) {
+  assert(_klass_closure._oop_closure == this, "Must be");
+
+  bool claim = true;  // Must claim the class loader data before processing.
+  cld->oops_do(_klass_closure._oop_closure, &_klass_closure, claim);
+}
+
+#endif // SHARE_VM_GC_CMS_CMSOOPCLOSURES_INLINE_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Wed May 13 15:16:06 2015 +0200
@@ -0,0 +1,3026 @@
+/*
+ * Copyright (c) 2001, 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/cms/cmsLockVerifier.hpp"
+#include "gc/cms/compactibleFreeListSpace.hpp"
+#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
+#include "gc/cms/concurrentMarkSweepThread.hpp"
+#include "gc/shared/blockOffsetTable.inline.hpp"
+#include "gc/shared/collectedHeap.inline.hpp"
+#include "gc/shared/genCollectedHeap.hpp"
+#include "gc/shared/liveRange.hpp"
+#include "gc/shared/space.inline.hpp"
+#include "gc/shared/spaceDecorator.hpp"
+#include "memory/allocation.inline.hpp"
+#include "memory/resourceArea.hpp"
+#include "memory/universe.inline.hpp"
+#include "oops/oop.inline.hpp"
+#include "runtime/globals.hpp"
+#include "runtime/handles.inline.hpp"
+#include "runtime/init.hpp"
+#include "runtime/java.hpp"
+#include "runtime/orderAccess.inline.hpp"
+#include "runtime/vmThread.hpp"
+#include "utilities/copy.hpp"
+
+/////////////////////////////////////////////////////////////////////////
+//// CompactibleFreeListSpace
+/////////////////////////////////////////////////////////////////////////
+
+// highest ranked  free list lock rank
+int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3;
+
+// Defaults are 0 so things will break badly if incorrectly initialized.
+size_t CompactibleFreeListSpace::IndexSetStart  = 0;
+size_t CompactibleFreeListSpace::IndexSetStride = 0;
+
+size_t MinChunkSize = 0;
+
+void CompactibleFreeListSpace::set_cms_values() {