changeset 8417:38506b2c64ad

Merge
author jwilhelm
date Mon, 18 May 2015 17:09:47 +0200
parents 643e214de9f1 ef29d5ca517b
children 803a4ef6298e
files agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java src/cpu/aarch64/vm/aarch64.ad src/cpu/aarch64/vm/macroAssembler_aarch64.cpp src/cpu/x86/vm/assembler_x86.cpp src/cpu/x86/vm/c1_Runtime1_x86.cpp src/cpu/x86/vm/macroAssembler_x86.cpp src/share/vm/classfile/verifier.hpp src/share/vm/code/codeCache.cpp src/share/vm/gc/g1/g1StringDedupTable.cpp src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsLockVerifier.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.cpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.inline.hpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.cpp src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.hpp src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp src/share/vm/gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp src/share/vm/gc_implementation/g1/bufferingOopClosure.cpp src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp src/share/vm/gc_implementation/g1/collectionSetChooser.cpp src/share/vm/gc_implementation/g1/collectionSetChooser.hpp src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp src/share/vm/gc_implementation/g1/concurrentMark.cpp src/share/vm/gc_implementation/g1/concurrentMark.hpp src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp src/share/vm/gc_implementation/g1/concurrentMarkThread.inline.hpp src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp src/share/vm/gc_implementation/g1/evacuationInfo.hpp src/share/vm/gc_implementation/g1/g1AllocRegion.cpp src/share/vm/gc_implementation/g1/g1AllocRegion.hpp src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp src/share/vm/gc_implementation/g1/g1AllocationContext.hpp src/share/vm/gc_implementation/g1/g1Allocator.cpp src/share/vm/gc_implementation/g1/g1Allocator.hpp src/share/vm/gc_implementation/g1/g1Allocator_ext.cpp src/share/vm/gc_implementation/g1/g1BiasedArray.cpp src/share/vm/gc_implementation/g1/g1BiasedArray.hpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp src/share/vm/gc_implementation/g1/g1CardCounts.cpp src/share/vm/gc_implementation/g1/g1CardCounts.hpp src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp src/share/vm/gc_implementation/g1/g1ErgoVerbose.cpp src/share/vm/gc_implementation/g1/g1ErgoVerbose.hpp src/share/vm/gc_implementation/g1/g1EvacFailure.cpp src/share/vm/gc_implementation/g1/g1EvacFailure.hpp src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp src/share/vm/gc_implementation/g1/g1HRPrinter.cpp src/share/vm/gc_implementation/g1/g1HRPrinter.hpp src/share/vm/gc_implementation/g1/g1HotCardCache.cpp src/share/vm/gc_implementation/g1/g1HotCardCache.hpp src/share/vm/gc_implementation/g1/g1InCSetState.hpp src/share/vm/gc_implementation/g1/g1Log.cpp src/share/vm/gc_implementation/g1/g1Log.hpp src/share/vm/gc_implementation/g1/g1MMUTracker.cpp src/share/vm/gc_implementation/g1/g1MMUTracker.hpp src/share/vm/gc_implementation/g1/g1MarkSweep.cpp src/share/vm/gc_implementation/g1/g1MarkSweep.hpp src/share/vm/gc_implementation/g1/g1MarkSweep_ext.cpp src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp src/share/vm/gc_implementation/g1/g1OopClosures.cpp src/share/vm/gc_implementation/g1/g1OopClosures.hpp src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.hpp src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.hpp src/share/vm/gc_implementation/g1/g1RemSet.cpp src/share/vm/gc_implementation/g1/g1RemSet.hpp src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp src/share/vm/gc_implementation/g1/g1RootProcessor.cpp src/share/vm/gc_implementation/g1/g1RootProcessor.hpp src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp src/share/vm/gc_implementation/g1/g1StringDedup.cpp src/share/vm/gc_implementation/g1/g1StringDedup.hpp src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp src/share/vm/gc_implementation/g1/g1StringDedupQueue.hpp src/share/vm/gc_implementation/g1/g1StringDedupStat.cpp src/share/vm/gc_implementation/g1/g1StringDedupStat.hpp src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp src/share/vm/gc_implementation/g1/g1StringDedupTable.hpp src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp src/share/vm/gc_implementation/g1/g1StringDedupThread.hpp src/share/vm/gc_implementation/g1/g1YCTypes.hpp src/share/vm/gc_implementation/g1/g1_globals.cpp src/share/vm/gc_implementation/g1/g1_globals.hpp src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp src/share/vm/gc_implementation/g1/heapRegion.cpp src/share/vm/gc_implementation/g1/heapRegion.hpp src/share/vm/gc_implementation/g1/heapRegion.inline.hpp src/share/vm/gc_implementation/g1/heapRegionBounds.hpp src/share/vm/gc_implementation/g1/heapRegionBounds.inline.hpp src/share/vm/gc_implementation/g1/heapRegionManager.cpp src/share/vm/gc_implementation/g1/heapRegionManager.hpp src/share/vm/gc_implementation/g1/heapRegionManager.inline.hpp src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp src/share/vm/gc_implementation/g1/heapRegionSet.cpp src/share/vm/gc_implementation/g1/heapRegionSet.hpp src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp src/share/vm/gc_implementation/g1/heapRegionType.cpp src/share/vm/gc_implementation/g1/heapRegionType.hpp src/share/vm/gc_implementation/g1/ptrQueue.cpp src/share/vm/gc_implementation/g1/ptrQueue.hpp src/share/vm/gc_implementation/g1/satbQueue.cpp src/share/vm/gc_implementation/g1/satbQueue.hpp src/share/vm/gc_implementation/g1/sparsePRT.cpp src/share/vm/gc_implementation/g1/sparsePRT.hpp src/share/vm/gc_implementation/g1/survRateGroup.cpp src/share/vm/gc_implementation/g1/survRateGroup.hpp src/share/vm/gc_implementation/g1/vmStructs_g1.hpp src/share/vm/gc_implementation/g1/vm_operations_g1.cpp src/share/vm/gc_implementation/g1/vm_operations_g1.hpp src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp src/share/vm/gc_implementation/parNew/parNewGeneration.cpp src/share/vm/gc_implementation/parNew/parNewGeneration.hpp src/share/vm/gc_implementation/parNew/parOopClosures.cpp src/share/vm/gc_implementation/parNew/parOopClosures.hpp src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp src/share/vm/gc_implementation/parNew/vmStructs_parNew.hpp src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.hpp src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.cpp src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.hpp src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.hpp src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.hpp src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp src/share/vm/gc_implementation/parallelScavenge/generationSizer.cpp src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp src/share/vm/gc_implementation/parallelScavenge/objectStartArray.cpp src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.cpp src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.hpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.cpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp src/share/vm/gc_implementation/parallelScavenge/psYoungGen.hpp src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.hpp src/share/vm/gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp src/share/vm/gc_implementation/shared/ageTable.cpp src/share/vm/gc_implementation/shared/ageTable.hpp src/share/vm/gc_implementation/shared/allocationStats.cpp src/share/vm/gc_implementation/shared/allocationStats.hpp src/share/vm/gc_implementation/shared/cSpaceCounters.cpp src/share/vm/gc_implementation/shared/cSpaceCounters.hpp src/share/vm/gc_implementation/shared/collectorCounters.cpp src/share/vm/gc_implementation/shared/collectorCounters.hpp src/share/vm/gc_implementation/shared/concurrentGCThread.cpp src/share/vm/gc_implementation/shared/concurrentGCThread.hpp src/share/vm/gc_implementation/shared/copyFailedInfo.hpp src/share/vm/gc_implementation/shared/gSpaceCounters.cpp src/share/vm/gc_implementation/shared/gSpaceCounters.hpp src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.cpp src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp src/share/vm/gc_implementation/shared/gcHeapSummary.hpp src/share/vm/gc_implementation/shared/gcId.cpp src/share/vm/gc_implementation/shared/gcId.hpp src/share/vm/gc_implementation/shared/gcPolicyCounters.cpp src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp src/share/vm/gc_implementation/shared/gcStats.cpp src/share/vm/gc_implementation/shared/gcStats.hpp src/share/vm/gc_implementation/shared/gcTimer.cpp src/share/vm/gc_implementation/shared/gcTimer.hpp src/share/vm/gc_implementation/shared/gcTrace.cpp src/share/vm/gc_implementation/shared/gcTrace.hpp src/share/vm/gc_implementation/shared/gcTraceSend.cpp src/share/vm/gc_implementation/shared/gcTraceTime.cpp src/share/vm/gc_implementation/shared/gcTraceTime.hpp src/share/vm/gc_implementation/shared/gcUtil.cpp src/share/vm/gc_implementation/shared/gcUtil.hpp src/share/vm/gc_implementation/shared/gcWhen.hpp src/share/vm/gc_implementation/shared/generationCounters.cpp src/share/vm/gc_implementation/shared/generationCounters.hpp src/share/vm/gc_implementation/shared/hSpaceCounters.cpp src/share/vm/gc_implementation/shared/hSpaceCounters.hpp src/share/vm/gc_implementation/shared/immutableSpace.cpp src/share/vm/gc_implementation/shared/immutableSpace.hpp src/share/vm/gc_implementation/shared/isGCActiveMark.hpp src/share/vm/gc_implementation/shared/liveRange.hpp src/share/vm/gc_implementation/shared/markSweep.cpp src/share/vm/gc_implementation/shared/markSweep.hpp src/share/vm/gc_implementation/shared/markSweep.inline.hpp src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp src/share/vm/gc_implementation/shared/mutableNUMASpace.hpp src/share/vm/gc_implementation/shared/mutableSpace.cpp src/share/vm/gc_implementation/shared/mutableSpace.hpp src/share/vm/gc_implementation/shared/objectCountEventSender.cpp src/share/vm/gc_implementation/shared/objectCountEventSender.hpp src/share/vm/gc_implementation/shared/plab.cpp src/share/vm/gc_implementation/shared/plab.hpp src/share/vm/gc_implementation/shared/plab.inline.hpp src/share/vm/gc_implementation/shared/spaceCounters.cpp src/share/vm/gc_implementation/shared/spaceCounters.hpp src/share/vm/gc_implementation/shared/spaceDecorator.cpp src/share/vm/gc_implementation/shared/spaceDecorator.hpp src/share/vm/gc_implementation/shared/suspendibleThreadSet.cpp src/share/vm/gc_implementation/shared/suspendibleThreadSet.hpp src/share/vm/gc_implementation/shared/vmGCOperations.cpp src/share/vm/gc_implementation/shared/vmGCOperations.hpp src/share/vm/gc_interface/allocTracer.cpp src/share/vm/gc_interface/allocTracer.hpp src/share/vm/gc_interface/collectedHeap.cpp src/share/vm/gc_interface/collectedHeap.hpp src/share/vm/gc_interface/collectedHeap.inline.hpp src/share/vm/gc_interface/gcCause.cpp src/share/vm/gc_interface/gcCause.hpp src/share/vm/gc_interface/gcName.hpp src/share/vm/memory/barrierSet.cpp src/share/vm/memory/barrierSet.hpp src/share/vm/memory/barrierSet.inline.hpp src/share/vm/memory/blockOffsetTable.cpp src/share/vm/memory/blockOffsetTable.hpp src/share/vm/memory/blockOffsetTable.inline.hpp src/share/vm/memory/cardGeneration.cpp src/share/vm/memory/cardGeneration.hpp src/share/vm/memory/cardGeneration.inline.hpp src/share/vm/memory/cardTableModRefBS.cpp src/share/vm/memory/cardTableModRefBS.hpp src/share/vm/memory/cardTableModRefBS.inline.hpp src/share/vm/memory/cardTableRS.cpp src/share/vm/memory/cardTableRS.hpp src/share/vm/memory/collectorPolicy.cpp src/share/vm/memory/collectorPolicy.hpp src/share/vm/memory/defNewGeneration.cpp src/share/vm/memory/defNewGeneration.hpp src/share/vm/memory/defNewGeneration.inline.hpp src/share/vm/memory/gcLocker.cpp src/share/vm/memory/gcLocker.hpp src/share/vm/memory/gcLocker.inline.hpp src/share/vm/memory/genCollectedHeap.cpp src/share/vm/memory/genCollectedHeap.hpp src/share/vm/memory/genMarkSweep.cpp src/share/vm/memory/genMarkSweep.hpp src/share/vm/memory/genOopClosures.cpp src/share/vm/memory/genOopClosures.hpp src/share/vm/memory/genOopClosures.inline.hpp src/share/vm/memory/genRemSet.cpp src/share/vm/memory/genRemSet.hpp src/share/vm/memory/genRemSet.inline.hpp src/share/vm/memory/generation.cpp src/share/vm/memory/generation.hpp src/share/vm/memory/generationSpec.cpp src/share/vm/memory/generationSpec.hpp src/share/vm/memory/modRefBarrierSet.hpp src/share/vm/memory/referencePolicy.cpp src/share/vm/memory/referencePolicy.hpp src/share/vm/memory/referenceProcessor.cpp src/share/vm/memory/referenceProcessor.hpp src/share/vm/memory/referenceProcessorStats.hpp src/share/vm/memory/space.cpp src/share/vm/memory/space.hpp src/share/vm/memory/space.inline.hpp src/share/vm/memory/specialized_oop_closures.hpp src/share/vm/memory/strongRootsScope.cpp src/share/vm/memory/strongRootsScope.hpp src/share/vm/memory/tenuredGeneration.cpp src/share/vm/memory/tenuredGeneration.hpp src/share/vm/memory/tenuredGeneration.inline.hpp src/share/vm/memory/threadLocalAllocBuffer.cpp src/share/vm/memory/threadLocalAllocBuffer.hpp src/share/vm/memory/threadLocalAllocBuffer.inline.hpp src/share/vm/memory/watermark.hpp src/share/vm/oops/klassVtable.cpp src/share/vm/opto/type.cpp src/share/vm/runtime/vmStructs.cpp src/share/vm/utilities/taskqueue.cpp src/share/vm/utilities/taskqueue.hpp src/share/vm/utilities/taskqueue.inline.hpp src/share/vm/utilities/vmError.cpp src/share/vm/utilities/workgroup.cpp src/share/vm/utilities/workgroup.hpp src/share/vm/utilities/yieldingWorkgroup.cpp src/share/vm/utilities/yieldingWorkgroup.hpp test/gc/concurrentMarkSweep/DisableResizePLAB.java test/gc/concurrentMarkSweep/GuardShrinkWarning.java test/gc/defnew/HeapChangeLogging.java test/gc/parallelScavenge/AdaptiveGCBoundary.java test/gc/parallelScavenge/TestDynShrinkHeap.java
diffstat 887 files changed, 119759 insertions(+), 119873 deletions(-) [+]
line wrap: on
line diff
--- a/agent/make/Makefile	Thu May 14 12:05:32 2015 -0700
+++ b/agent/make/Makefile	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/HSDB.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1Allocator.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/G1MonitoringSupport.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetCount.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSOldGen.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/PSYoungGen.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/parallel/ParallelScavengeHeap.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeap.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/G1YCType.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCName.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/GCWhen.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/ImmutableSpace.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc/shared/MutableSpace.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1Allocator.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-public class G1Allocator extends VMObject {
-
-  //size_t _summary_bytes_used;
-  static private CIntegerField summaryBytesUsedField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-      public void update(Observable o, Object data) {
-        initialize(VM.getVM().getTypeDataBase());
-      }
-    });
-  }
-
-  static private synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("G1Allocator");
-
-    summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
-  }
-
-  public long getSummaryBytes() {
-    return summaryBytesUsedField.getValue(addr);
-  }
-
-  public G1Allocator(Address addr) {
-    super(addr);
-
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1CollectedHeap.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.gc_interface.CollectedHeap;
-import sun.jvm.hotspot.gc_interface.CollectedHeapName;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.memory.SpaceClosure;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1CollectedHeap.
-
-public class G1CollectedHeap extends CollectedHeap {
-    // HeapRegionManager _hrm;
-    static private long hrmFieldOffset;
-    // MemRegion _g1_reserved;
-    static private long g1ReservedFieldOffset;
-    // G1Allocator* _allocator
-    static private AddressField g1Allocator;
-    // G1MonitoringSupport* _g1mm;
-    static private AddressField g1mmField;
-    // HeapRegionSet _old_set;
-    static private long oldSetFieldOffset;
-    // HeapRegionSet _humongous_set;
-    static private long humongousSetFieldOffset;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1CollectedHeap");
-
-        hrmFieldOffset = type.getField("_hrm").getOffset();
-        g1Allocator = type.getAddressField("_allocator");
-        g1mmField = type.getAddressField("_g1mm");
-        oldSetFieldOffset = type.getField("_old_set").getOffset();
-        humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
-    }
-
-    public long capacity() {
-        return hrm().capacity();
-    }
-
-    public long used() {
-        return allocator().getSummaryBytes();
-    }
-
-    public long n_regions() {
-        return hrm().length();
-    }
-
-    private HeapRegionManager hrm() {
-        Address hrmAddr = addr.addOffsetTo(hrmFieldOffset);
-        return (HeapRegionManager) VMObjectFactory.newObject(HeapRegionManager.class,
-                                                         hrmAddr);
-    }
-
-    public G1MonitoringSupport g1mm() {
-        Address g1mmAddr = g1mmField.getValue(addr);
-        return (G1MonitoringSupport) VMObjectFactory.newObject(G1MonitoringSupport.class, g1mmAddr);
-    }
-
-    public G1Allocator allocator() {
-        Address g1AllocatorAddr = g1Allocator.getValue(addr);
-        return (G1Allocator) VMObjectFactory.newObject(G1Allocator.class, g1AllocatorAddr);
-    }
-
-    public HeapRegionSetBase oldSet() {
-        Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             oldSetAddr);
-    }
-
-    public HeapRegionSetBase humongousSet() {
-        Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset);
-        return (HeapRegionSetBase) VMObjectFactory.newObject(HeapRegionSetBase.class,
-                                                             humongousSetAddr);
-    }
-
-    private Iterator<HeapRegion> heapRegionIterator() {
-        return hrm().heapRegionIterator();
-    }
-
-    public void heapRegionIterate(SpaceClosure scl) {
-        Iterator<HeapRegion> iter = heapRegionIterator();
-        while (iter.hasNext()) {
-            HeapRegion hr = iter.next();
-            scl.doSpace(hr);
-        }
-    }
-
-    public CollectedHeapName kind() {
-        return CollectedHeapName.G1_COLLECTED_HEAP;
-    }
-
-    public G1CollectedHeap(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1HeapRegionTable.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1HeapRegionTable. It's essentially an index -> HeapRegion map.
-
-public class G1HeapRegionTable extends VMObject {
-    // HeapRegion** _base;
-    static private AddressField baseField;
-    // uint _length;
-    static private CIntegerField lengthField;
-    // HeapRegion** _biased_base
-    static private AddressField biasedBaseField;
-    // size_t _bias
-    static private CIntegerField biasField;
-    // uint _shift_by
-    static private CIntegerField shiftByField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1HeapRegionTable");
-
-        baseField = type.getAddressField("_base");
-        lengthField = type.getCIntegerField("_length");
-        biasedBaseField = type.getAddressField("_biased_base");
-        biasField = type.getCIntegerField("_bias");
-        shiftByField = type.getCIntegerField("_shift_by");
-    }
-
-    private HeapRegion at(long index) {
-        Address arrayAddr = baseField.getValue(addr);
-        // Offset of &_base[index]
-        long offset = index * VM.getVM().getAddressSize();
-        Address regionAddr = arrayAddr.getAddressAt(offset);
-        return (HeapRegion) VMObjectFactory.newObject(HeapRegion.class,
-                                                      regionAddr);
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long bias() {
-        return biasField.getValue(addr);
-    }
-
-    public long shiftBy() {
-        return shiftByField.getValue(addr);
-    }
-
-    private class HeapRegionIterator implements Iterator<HeapRegion> {
-        private long index;
-        private long length;
-        private HeapRegion next;
-
-        public HeapRegion positionToNext() {
-          HeapRegion result = next;
-          while (index < length && at(index) == null) {
-            index++;
-          }
-          if (index < length) {
-            next = at(index);
-            index++; // restart search at next element
-          } else {
-            next = null;
-          }
-          return result;
-        }
-
-        @Override
-        public boolean hasNext() { return next != null;     }
-
-        @Override
-        public HeapRegion next() { return positionToNext(); }
-
-        @Override
-        public void remove()     { /* not supported */      }
-
-        HeapRegionIterator(long totalLength) {
-            index = 0;
-            length = totalLength;
-            positionToNext();
-        }
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator(long committedLength) {
-        return new HeapRegionIterator(committedLength);
-    }
-
-    public G1HeapRegionTable(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/G1MonitoringSupport.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for G1MonitoringSupport.
-
-public class G1MonitoringSupport extends VMObject {
-    // size_t _eden_committed;
-    static private CIntegerField edenCommittedField;
-    // size_t _eden_used;
-    static private CIntegerField edenUsedField;
-    // size_t _survivor_committed;
-    static private CIntegerField survivorCommittedField;
-    // size_t _survivor_used;
-    static private CIntegerField survivorUsedField;
-    // size_t _old_committed;
-    static private CIntegerField oldCommittedField;
-    // size_t _old_used;
-    static private CIntegerField oldUsedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("G1MonitoringSupport");
-
-        edenCommittedField = type.getCIntegerField("_eden_committed");
-        edenUsedField = type.getCIntegerField("_eden_used");
-        survivorCommittedField = type.getCIntegerField("_survivor_committed");
-        survivorUsedField = type.getCIntegerField("_survivor_used");
-        oldCommittedField = type.getCIntegerField("_old_committed");
-        oldUsedField = type.getCIntegerField("_old_used");
-    }
-
-    public long edenCommitted() {
-        return edenCommittedField.getValue(addr);
-    }
-
-    public long edenUsed() {
-        return edenUsedField.getValue(addr);
-    }
-
-    public long edenRegionNum() {
-        return edenUsed() / HeapRegion.grainBytes();
-    }
-
-    public long survivorCommitted() {
-        return survivorCommittedField.getValue(addr);
-    }
-
-    public long survivorUsed() {
-        return survivorUsedField.getValue(addr);
-    }
-
-    public long survivorRegionNum() {
-        return survivorUsed() / HeapRegion.grainBytes();
-    }
-
-    public long oldCommitted() {
-        return oldCommittedField.getValue(addr);
-    }
-
-    public long oldUsed() {
-        return oldUsedField.getValue(addr);
-    }
-
-    public G1MonitoringSupport(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegion.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.memory.CompactibleSpace;
-import sun.jvm.hotspot.memory.MemRegion;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegion. Currently we don't actually include
-// any of its fields but only iterate over it.
-
-public class HeapRegion extends CompactibleSpace {
-    // static int GrainBytes;
-    static private CIntegerField grainBytesField;
-    static private AddressField topField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegion");
-
-        grainBytesField = type.getCIntegerField("GrainBytes");
-        topField = type.getAddressField("_top");
-
-    }
-
-    static public long grainBytes() {
-        return grainBytesField.getValue();
-    }
-
-    public HeapRegion(Address addr) {
-        super(addr);
-    }
-
-    public Address top() {
-        return topField.getValue(addr);
-    }
-
-    @Override
-    public List getLiveRegions() {
-        List res = new ArrayList();
-        res.add(new MemRegion(bottom(), top()));
-        return res;
-    }
-
-    @Override
-    public long used() {
-        return top().minus(bottom());
-    }
-
-    @Override
-    public long free() {
-        return end().minus(top());
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionManager.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionManager.
-
-public class HeapRegionManager extends VMObject {
-    // G1HeapRegionTable _regions
-    static private long regionsFieldOffset;
-    // uint _committed_length
-    static private CIntegerField numCommittedField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionManager");
-
-        regionsFieldOffset = type.getField("_regions").getOffset();
-        numCommittedField = type.getCIntegerField("_num_committed");
-    }
-
-    private G1HeapRegionTable regions() {
-        Address regionsAddr = addr.addOffsetTo(regionsFieldOffset);
-        return (G1HeapRegionTable) VMObjectFactory.newObject(G1HeapRegionTable.class,
-                                                             regionsAddr);
-    }
-
-    public long capacity() {
-        return length() * HeapRegion.grainBytes();
-    }
-
-    public long length() {
-        return regions().length();
-    }
-
-    public long committedLength() {
-        return numCommittedField.getValue(addr);
-    }
-
-    public Iterator<HeapRegion> heapRegionIterator() {
-        return regions().heapRegionIterator(length());
-    }
-
-    public HeapRegionManager(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetBase.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetBase. Represents a group of regions.
-
-public class HeapRegionSetBase extends VMObject {
-
-    static private long countField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetBase");
-
-        countField = type.getField("_count").getOffset();
-    }
-
-
-    public HeapRegionSetCount count() {
-        Address countFieldAddr = addr.addOffsetTo(countField);
-        return (HeapRegionSetCount) VMObjectFactory.newObject(HeapRegionSetCount.class, countFieldAddr);
-    }
-
-    public HeapRegionSetBase(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/g1/HeapRegionSetCount.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.g1;
-
-import java.util.Iterator;
-import java.util.Observable;
-import java.util.Observer;
-
-import sun.jvm.hotspot.debugger.Address;
-import sun.jvm.hotspot.runtime.VM;
-import sun.jvm.hotspot.runtime.VMObject;
-import sun.jvm.hotspot.runtime.VMObjectFactory;
-import sun.jvm.hotspot.types.AddressField;
-import sun.jvm.hotspot.types.CIntegerField;
-import sun.jvm.hotspot.types.Type;
-import sun.jvm.hotspot.types.TypeDataBase;
-
-// Mirror class for HeapRegionSetCount. Represents a group of regions.
-
-public class HeapRegionSetCount extends VMObject {
-
-    static private CIntegerField lengthField;
-    static private CIntegerField capacityField;
-
-    static {
-        VM.registerVMInitializedObserver(new Observer() {
-                public void update(Observable o, Object data) {
-                    initialize(VM.getVM().getTypeDataBase());
-                }
-            });
-    }
-
-    static private synchronized void initialize(TypeDataBase db) {
-        Type type = db.lookupType("HeapRegionSetCount");
-
-        lengthField   = type.getCIntegerField("_length");
-        capacityField = type.getCIntegerField("_capacity");
-    }
-
-    public long length() {
-        return lengthField.getValue(addr);
-    }
-
-    public long capacity() {
-        return capacityField.getValue(addr);
-    }
-
-    public HeapRegionSetCount(Address addr) {
-        super(addr);
-    }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSOldGen.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSOldGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSOldGen");
-      objectSpaceField = type.getAddressField("_object_space");
-   }
-
-   public PSOldGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField objectSpaceField;
-
-   // Accessors
-   public MutableSpace objectSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, objectSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return objectSpace().capacity();
-   }
-
-   public long used() {
-      return objectSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      return objectSpace().contains(a);
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSOldGen [ ");
-      objectSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/PSYoungGen.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_implementation.shared.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class PSYoungGen extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("PSYoungGen");
-      edenSpaceField = type.getAddressField("_eden_space");
-      fromSpaceField = type.getAddressField("_from_space");
-      toSpaceField = type.getAddressField("_to_space");
-   }
-
-   public PSYoungGen(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField edenSpaceField;
-   private static AddressField fromSpaceField;
-   private static AddressField toSpaceField;
-
-   // Accessors
-   public MutableSpace edenSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, edenSpaceField.getValue(addr));
-   }
-
-   public MutableSpace fromSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, fromSpaceField.getValue(addr));
-   }
-
-   public MutableSpace toSpace() {
-      return (MutableSpace) VMObjectFactory.newObject(MutableSpace.class, toSpaceField.getValue(addr));
-   }
-
-   public long capacity() {
-      return edenSpace().capacity() + fromSpace().capacity();
-   }
-
-   public long used() {
-      return edenSpace().used() + fromSpace().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (edenSpace().contains(a)) {
-         return true;
-      }
-
-      if (fromSpace().contains(a)) {
-         return true;
-      }
-      return false;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("PSYoungGen [ ");
-      tty.print("eden = ");
-      edenSpace().printOn(tty);
-      tty.print(", from = ");
-      fromSpace().printOn(tty);
-      tty.print(", to = ");
-      toSpace().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/parallelScavenge/ParallelScavengeHeap.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.parallelScavenge;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.gc_interface.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class ParallelScavengeHeap extends CollectedHeap {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ParallelScavengeHeap");
-      youngGenField = type.getAddressField("_young_gen");
-      oldGenField    = type.getAddressField("_old_gen");
-   }
-
-   public ParallelScavengeHeap(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField youngGenField;
-   private static AddressField oldGenField;
-
-   // Accessors
-   public PSYoungGen youngGen() {
-      return (PSYoungGen) VMObjectFactory.newObject(PSYoungGen.class, youngGenField.getValue());
-   }
-
-   public PSOldGen oldGen() {
-      return (PSOldGen) VMObjectFactory.newObject(PSOldGen.class, oldGenField.getValue());
-   }
-
-   public long capacity() {
-      return youngGen().capacity() + oldGen().capacity();
-   }
-
-   public long used() {
-      return youngGen().used() + oldGen().used();
-   }
-
-   public boolean isIn(Address a) {
-      if (youngGen().isIn(a)) {
-         return true;
-      }
-
-      if (oldGen().isIn(a)) {
-         return true;
-      }
-
-      return false;
-   }
-
-   public CollectedHeapName kind() {
-      return CollectedHeapName.PARALLEL_SCAVENGE_HEAP;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print("ParallelScavengeHeap [ ");
-      youngGen().printOn(tty);
-      oldGen().printOn(tty);
-      tty.print(" ] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/ImmutableSpace.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class ImmutableSpace extends VMObject {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("ImmutableSpace");
-      bottomField = type.getAddressField("_bottom");
-      endField    = type.getAddressField("_end");
-   }
-
-   public ImmutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField bottomField;
-   private static AddressField endField;
-
-   // Accessors
-   public Address   bottom()       { return bottomField.getValue(addr); }
-   public Address   end()          { return endField.getValue(addr);    }
-
-   /** Returns a subregion of the space containing all the objects in
-      the space. */
-   public MemRegion usedRegion() {
-      return new MemRegion(bottom(), end());
-   }
-
-   /** Support for iteration over heap -- not sure how this will
-      interact with GC in reflective system, but necessary for the
-      debugging mechanism */
-   public OopHandle bottomAsOopHandle() {
-      return bottomField.getOopHandle(addr);
-   }
-
-   /** returns all MemRegions where live objects are */
-   public abstract List/*<MemRegion>*/ getLiveRegions();
-
-   /** Returned value is in bytes */
-   public long capacity() { return end().minus(bottom()); }
-
-   public abstract long used();
-
-   /** Testers */
-   public boolean contains(Address p) {
-      return (bottom().lessThanOrEqual(p) && end().greaterThan(p));
-   }
-
-   public void print() { printOn(System.out); }
-   public abstract void printOn(PrintStream tty);
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_implementation/shared/MutableSpace.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_implementation.shared;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public class MutableSpace extends ImmutableSpace {
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize(VM.getVM().getTypeDataBase());
-         }
-      });
-   }
-
-   private static synchronized void initialize(TypeDataBase db) {
-      Type type = db.lookupType("MutableSpace");
-      topField    = type.getAddressField("_top");
-   }
-
-   public MutableSpace(Address addr) {
-      super(addr);
-   }
-
-   // Fields
-   private static AddressField topField;
-
-   // Accessors
-   public Address   top()          { return topField.getValue(addr);    }
-
-   /** In bytes */
-   public long used() {
-      return top().minus(bottom());
-   }
-
-   /** returns all MemRegions where live objects are */
-   public List/*<MemRegion>*/ getLiveRegions() {
-      List res = new ArrayList();
-      res.add(new MemRegion(bottom(), top()));
-      return res;
-   }
-
-   public void printOn(PrintStream tty) {
-      tty.print(" [" + bottom() + "," +
-                top() + "," + end() + "] ");
-   }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeap.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-import java.io.*;
-import java.util.*;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-
-public abstract class CollectedHeap extends VMObject {
-  private static long         reservedFieldOffset;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("CollectedHeap");
-
-    reservedFieldOffset = type.getField("_reserved").getOffset();
-  }
-
-  public CollectedHeap(Address addr) {
-    super(addr);
-  }
-
-  /** Returns the lowest address of the heap. */
-  public Address start() {
-    return reservedRegion().start();
-  }
-
-  public long capacity() { return 0; }
-  public long used()     { return 0; }
-
-  public MemRegion reservedRegion() {
-    return new MemRegion(addr.addOffsetTo(reservedFieldOffset));
-  }
-
-  public boolean isIn(Address a) {
-    return isInReserved(a);
-  }
-
-  public boolean isInReserved(Address a) {
-    return reservedRegion().contains(a);
-  }
-
-  public abstract CollectedHeapName kind();
-
-  public void print() { printOn(System.out); }
-  public void printOn(PrintStream tty) {
-    MemRegion mr = reservedRegion();
-    tty.println("unknown subtype of CollectedHeap @ " + getAddress() + " (" +
-                mr.start() + "," + mr.end() + ")");
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/CollectedHeapName.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-/** Mimics the enums in the VM under CollectedHeap::Name */
-
-public class CollectedHeapName {
-  private String name;
-
-  private CollectedHeapName(String name) { this.name = name; }
-
-  public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap");
-  public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap");
-  public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
-
-  public String toString() {
-    return name;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/G1YCType.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot
-//code.
-
-public enum G1YCType {
-  Normal ("Normal"),
-  InitialMark ("Initial Mark"),
-  DuringMark ("During Mark"),
-  Mixed ("Mixed"),
-  G1YCTypeEndSentinel ("Unknown");
-
-  private final String value;
-
-  G1YCType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCCause {
-  _java_lang_system_gc ("System.gc()"),
-  _full_gc_alot ("FullGCAlot"),
-  _scavenge_alot ("ScavengeAlot"),
-  _allocation_profiler ("Allocation Profiler"),
-  _jvmti_force_gc ("JvmtiEnv ForceGarbageCollection"),
-  _gc_locker ("GCLocker Initiated GC"),
-  _heap_inspection ("Heap Inspection Initiated GC"),
-  _heap_dump ("Heap Dump Initiated GC"),
-
-  _no_gc ("No GC"),
-  _no_cause_specified ("Unknown GCCause"),
-  _allocation_failure ("Allocation Failure"),
-
-  _tenured_generation_full ("Tenured Generation Full"),
-  _metadata_GC_threshold ("Metadata GC Threshold"),
-
-  _cms_generation_full ("CMS Generation Full"),
-  _cms_initial_mark ("CMS Initial Mark"),
-  _cms_final_remark ("CMS Final Remark"),
-  _cms_concurrent_mark ("CMS Concurrent Mark"),
-
-  _old_generation_expanded_on_last_scavenge ("Old Generation Expanded On Last Scavenge"),
-  _old_generation_too_full_to_scavenge ("Old Generation Too Full To Scavenge"),
-  _adaptive_size_policy ("Ergonomics"),
-
-  _g1_inc_collection_pause ("G1 Evacuation Pause"),
-  _g1_humongous_allocation ("G1 Humongous Allocation"),
-
-  _last_ditch_collection ("Last ditch collection"),
-  _last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE");
-
-  private final String value;
-
-  GCCause(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCName.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCName {
-  ParallelOld ("ParallelOld"),
-  SerialOld ("SerialOld"),
-  PSMarkSweep ("PSMarkSweep"),
-  ParallelScavenge ("ParallelScavenge"),
-  DefNew ("DefNew"),
-  ParNew ("ParNew"),
-  G1New ("G1New"),
-  ConcurrentMarkSweep ("ConcurrentMarkSweep"),
-  G1Old ("G1Old"),
-  GCNameEndSentinel ("GCNameEndSentinel");
-
-  private final String value;
-
-  GCName(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCWhen.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum GCWhen {
-  BeforeGC ("Before GC"),
-  AfterGC ("After GC"),
-  GCWhenEndSentinel ("GCWhenEndSentinel");
-
-  private final String value;
-
-  GCWhen(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
-
-
-
--- a/agent/src/share/classes/sun/jvm/hotspot/gc_interface/ReferenceType.java	Thu May 14 12:05:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.gc_interface;
-
-//These definitions should be kept in sync with the definitions in the HotSpot code.
-
-public enum ReferenceType {
-  REF_NONE ("None reference"),       // Regular class
-  REF_OTHER ("Other reference"),     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
-  REF_SOFT ("Soft reference"),       // Subclass of java/lang/ref/SoftReference
-  REF_WEAK ("Weak reference"),       // Subclass of java/lang/ref/WeakReference
-  REF_FINAL ("Final reference"),     // Subclass of java/lang/ref/FinalReference
-  REF_PHANTOM ("Phantom reference"); // Subclass of java/lang/ref/PhantomReference
-
-  private final String value;
-
-  ReferenceType(String val) {
-    this.value = val;
-  }
-  public String value() {
-    return value;
-  }
-}
--- a/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/memory/ReferenceType.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/utilities/LivenessAnalysis.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/LivenessAnalysis.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/utilities/MarkBits.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/MarkBits.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java	Mon May 18 17:09:47 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/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java	Thu May 14 12:05:32 2015 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java	Mon May 18 17:09:47 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/make/aix/makefiles/vm.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/aix/makefiles/vm.make	Mon May 18 17:09:47 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/make/bsd/makefiles/vm.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/bsd/makefiles/vm.make	Mon May 18 17:09:47 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/make/excludeSrc.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/excludeSrc.make	Mon May 18 17:09:47 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/make/linux/makefiles/vm.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/linux/makefiles/vm.make	Mon May 18 17:09:47 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/make/pic.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/pic.make	Mon May 18 17:09:47 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/make/sa.files	Thu May 14 12:05:32 2015 -0700
+++ b/make/sa.files	Mon May 18 17:09:47 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/make/solaris/makefiles/vm.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/solaris/makefiles/vm.make	Mon May 18 17:09:47 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/make/windows/create_obj_files.sh	Thu May 14 12:05:32 2015 -0700
+++ b/make/windows/create_obj_files.sh	Mon May 18 17:09:47 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/make/windows/makefiles/vm.make	Thu May 14 12:05:32 2015 -0700
+++ b/make/windows/makefiles/vm.make	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/aarch64.ad	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/aarch64.ad	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/c1_MacroAssembler_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/c1_MacroAssembler_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/icBuffer_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/icBuffer_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Mon May 18 17:09:47 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/src/cpu/ppc/vm/assembler_ppc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/ppc/vm/assembler_ppc.cpp	Mon May 18 17:09:47 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/src/cpu/ppc/vm/icBuffer_ppc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/ppc/vm/icBuffer_ppc.cpp	Mon May 18 17:09:47 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/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/icBuffer_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/icBuffer_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/assembler_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/assembler_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/icBuffer_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/icBuffer_x86.cpp	Mon May 18 17:09:47 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/src/cpu/x86/vm/macroAssembler_x86.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/x86/vm/macroAssembler_x86.cpp	Mon May 18 17:09:47 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/src/cpu/zero/vm/assembler_zero.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/zero/vm/assembler_zero.cpp	Mon May 18 17:09:47 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/src/cpu/zero/vm/icBuffer_zero.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/cpu/zero/vm/icBuffer_zero.cpp	Mon May 18 17:09:47 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/src/os/bsd/dtrace/generateJvmOffsets.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/os/bsd/dtrace/generateJvmOffsets.cpp	Mon May 18 17:09:47 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/src/os/solaris/dtrace/generateJvmOffsets.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/os/solaris/dtrace/generateJvmOffsets.cpp	Mon May 18 17:09:47 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/src/share/vm/adlc/main.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/adlc/main.cpp	Mon May 18 17:09:47 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/src/share/vm/asm/codeBuffer.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/asm/codeBuffer.cpp	Mon May 18 17:09:47 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/src/share/vm/c1/c1_LIRGenerator.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Mon May 18 17:09:47 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/src/share/vm/c1/c1_Runtime1.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/c1/c1_Runtime1.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciBaseObject.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciBaseObject.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciEnv.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciEnv.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciField.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciField.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciMetadata.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciMetadata.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciObject.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciObject.cpp	Mon May 18 17:09:47 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/src/share/vm/ci/ciObjectFactory.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/ci/ciObjectFactory.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/classFileParser.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/classFileParser.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/classLoader.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/classLoader.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/classLoaderData.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/classLoaderData.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/stringTable.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/stringTable.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/symbolTable.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/symbolTable.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/systemDictionary.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/systemDictionary.cpp	Mon May 18 17:09:47 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/src/share/vm/classfile/verifier.hpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/classfile/verifier.hpp	Mon May 18 17:09:47 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/src/share/vm/code/codeCache.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/code/codeCache.cpp	Mon May 18 17:09:47 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/src/share/vm/code/icBuffer.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/code/icBuffer.cpp	Mon May 18 17:09:47 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/src/share/vm/compiler/disassembler.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/compiler/disassembler.cpp	Mon May 18 17:09:47 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/src/share/vm/compiler/oopMap.cpp	Thu May 14 12:05:32 2015 -0700
+++ b/src/share/vm/compiler/oopMap.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/adaptiveFreeList.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/adaptiveFreeList.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/allocationStats.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/allocationStats.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsCollectorPolicy.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsCollectorPolicy.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsLockVerifier.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsLockVerifier.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsOopClosures.cpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsOopClosures.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/cmsOopClosures.inline.hpp	Mon May 18 17:09:47 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/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon May 18 17:09:47 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() {
+  // Set CMS global values
+  assert(MinChunkSize == 0, "already set");
+
+  // MinChunkSize should be a multiple of MinObjAlignment and be large enough
+  // for chunks to contain a FreeChunk.
+  size_t min_chunk_size_in_bytes = align_size_up(sizeof(FreeChunk), MinObjAlignmentInBytes);
+  MinChunkSize = min_chunk_size_in_bytes / BytesPerWord;
+
+  assert(IndexSetStart == 0 && IndexSetStride == 0, "already set");
+  IndexSetStart  = MinChunkSize;
+  IndexSetStride = MinObjAlignment;
+}
+
+// Constructor
+CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs,
+  MemRegion mr, bool use_adaptive_freelists,
+  FreeBlockDictionary<FreeChunk>::DictionaryChoice dictionaryChoice) :
+  _dictionaryChoice(dictionaryChoice),
+  _adaptive_freelists(use_adaptive_freelists),
+  _bt(bs, mr),
+  // free list locks are in the range of values taken by _lockRank
+  // This range currently is [_leaf+2, _leaf+3]
+  // Note: this requires that CFLspace c'tors
+  // are called serially in the order in which the locks are
+  // are acquired in the program text. This is true today.
+  _freelistLock(_lockRank--, "CompactibleFreeListSpace._lock", true,
+                Monitor::_safepoint_check_sometimes),
+  _parDictionaryAllocLock(Mutex::leaf - 1,  // == rank(ExpandHeap_lock) - 1
+                          "CompactibleFreeListSpace._dict_par_lock", true,
+                          Monitor::_safepoint_check_never),
+  _rescan_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
+                    CMSRescanMultiple),
+  _marking_task_size(CardTableModRefBS::card_size_in_words * BitsPerWord *
+                    CMSConcMarkMultiple),
+  _collector(NULL),
+  _preconsumptionDirtyCardClosure(NULL)
+{
+  assert(sizeof(FreeChunk) / BytesPerWord <= MinChunkSize,
+         "FreeChunk is larger than expected");
+  _bt.set_space(this);
+  initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
+  // We have all of "mr", all of which we place in the dictionary
+  // as one big chunk. We'll need to decide here which of several
+  // possible alternative dictionary implementations to use. For
+  // now the choice is easy, since we have only one working
+  // implementation, namely, the simple binary tree (splaying
+  // temporarily disabled).
+  switch (dictionaryChoice) {
+    case FreeBlockDictionary<FreeChunk>::dictionaryBinaryTree:
+      _dictionary = new AFLBinaryTreeDictionary(mr);
+      break;
+    case FreeBlockDictionary<FreeChunk>::dictionarySplayTree:
+    case FreeBlockDictionary<FreeChunk>::dictionarySkipList:
+    default:
+      warning("dictionaryChoice: selected option not understood; using"
+              " default BinaryTreeDictionary implementation instead.");
+  }
+  assert(_dictionary != NULL, "CMS dictionary initialization");
+  // The indexed free lists are initially all empty and are lazily
+  // filled in on demand. Initialize the array elements to NULL.
+  initializeIndexedFreeListArray();
+
+  // Not using adaptive free lists assumes that allocation is first
+  // from the linAB's.  Also a cms perm gen which can be compacted
+  // has to have the klass's klassKlass allocated at a lower
+  // address in the heap than the klass so that the klassKlass is
+  // moved to its new location before the klass is moved.
+  // Set the _refillSize for the linear allocation blocks
+  if (!use_adaptive_freelists) {
+    FreeChunk* fc = _dictionary->get_chunk(mr.word_size(),
+                                           FreeBlockDictionary<FreeChunk>::atLeast);
+    // The small linAB initially has all the space and will allocate
+    // a chunk of any size.
+    HeapWord* addr = (HeapWord*) fc;
+    _smallLinearAllocBlock.set(addr, fc->size() ,
+      1024*SmallForLinearAlloc, fc->size());
+    // Note that _unallocated_block is not updated here.
+    // Allocations from the linear allocation block should
+    // update it.
+  } else {
+    _smallLinearAllocBlock.set(0, 0, 1024*SmallForLinearAlloc,
+                               SmallForLinearAlloc);
+  }
+  // CMSIndexedFreeListReplenish should be at least 1
+  CMSIndexedFreeListReplenish = MAX2((uintx)1, CMSIndexedFreeListReplenish);
+  _promoInfo.setSpace(this);
+  if (UseCMSBestFit) {
+    _fitStrategy = FreeBlockBestFitFirst;
+  } else {
+    _fitStrategy = FreeBlockStrategyNone;
+  }
+  check_free_list_consistency();
+
+  // Initialize locks for parallel case.
+  for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
+    _indexedFreeListParLocks[i] = new Mutex(Mutex::leaf - 1, // == ExpandHeap_lock - 1
+                                            "a freelist par lock", true, Mutex::_safepoint_check_sometimes);
+    DEBUG_ONLY(
+      _indexedFreeList[i].set_protecting_lock(_indexedFreeListParLocks[i]);
+    )
+  }
+  _dictionary->set_par_lock(&_parDictionaryAllocLock);
+}
+
+// Like CompactibleSpace forward() but always calls cross_threshold() to
+// update the block offset table.  Removed initialize_threshold call because
+// CFLS does not use a block offset array for contiguous spaces.
+HeapWord* CompactibleFreeListSpace::forward(oop q, size_t size,
+                                    CompactPoint* cp, HeapWord* compact_top) {
+  // q is alive
+  // First check if we should switch compaction space
+  assert(this == cp->space, "'this' should be current compaction space.");
+  size_t compaction_max_size = pointer_delta(end(), compact_top);
+  assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size),
+    "virtual adjustObjectSize_v() method is not correct");
+  size_t adjusted_size = adjustObjectSize(size);
+  assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0,
+         "no small fragments allowed");
+  assert(minimum_free_block_size() == MinChunkSize,
+         "for de-virtualized reference below");
+  // Can't leave a nonzero size, residual fragment smaller than MinChunkSize
+  if (adjusted_size + MinChunkSize > compaction_max_size &&
+      adjusted_size != compaction_max_size) {
+    do {
+      // switch to next compaction space
+      cp->space->set_compaction_top(compact_top);
+      cp->space = cp->space->next_compaction_space();
+      if (cp->space == NULL) {
+        cp->gen = GenCollectedHeap::heap()->young_gen();
+        assert(cp->gen != NULL, "compaction must succeed");
+        cp->space = cp->gen->first_compaction_space();
+        assert(cp->space != NULL, "generation must have a first compaction space");
+      }
+      compact_top = cp->space->bottom();
+      cp->space->set_compaction_top(compact_top);
+      // The correct adjusted_size may not be the same as that for this method
+      // (i.e., cp->space may no longer be "this" so adjust the size again.
+      // Use the virtual method which is not used above to save the virtual
+      // dispatch.
+      adjusted_size = cp->space->adjust_object_size_v(size);
+      compaction_max_size = pointer_delta(cp->space->end(), compact_top);
+      assert(cp->space->minimum_free_block_size() == 0, "just checking");
+    } while (adjusted_size > compaction_max_size);
+  }
+
+  // store the forwarding pointer into the mark word
+  if ((HeapWord*)q != compact_top) {
+    q->forward_to(oop(compact_top));
+    assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
+  } else {
+    // if the object isn't moving we can just set the mark to the default
+    // mark and handle it specially later on.
+    q->init_mark();
+    assert(q->forwardee() == NULL, "should be forwarded to NULL");
+  }
+
+  compact_top += adjusted_size;
+
+  // we need to update the offset table so that the beginnings of objects can be
+  // found during scavenge.  Note that we are updating the offset table based on
+  // where the object will be once the compaction phase finishes.
+
+  // Always call cross_threshold().  A contiguous space can only call it when
+  // the compaction_top exceeds the current threshold but not for an
+  // non-contiguous space.
+  cp->threshold =
+    cp->space->cross_threshold(compact_top - adjusted_size, compact_top);
+  return compact_top;
+}
+
+// A modified copy of OffsetTableContigSpace::cross_threshold() with _offsets -> _bt
+// and use of single_block instead of alloc_block.  The name here is not really
+// appropriate - maybe a more general name could be invented for both the
+// contiguous and noncontiguous spaces.
+
+HeapWord* CompactibleFreeListSpace::cross_threshold(HeapWord* start, HeapWord* the_end) {
+  _bt.single_block(start, the_end);
+  return end();
+}
+
+// Initialize them to NULL.
+void CompactibleFreeListSpace::initializeIndexedFreeListArray() {
+  for (size_t i = 0; i < IndexSetSize; i++) {
+    // Note that on platforms where objects are double word aligned,
+    // the odd array elements are not used.  It is convenient, however,
+    // to map directly from the object size to the array element.
+    _indexedFreeList[i].reset(IndexSetSize);
+    _indexedFreeList[i].set_size(i);
+    assert(_indexedFreeList[i].count() == 0, "reset check failed");
+    assert(_indexedFreeList[i].head() == NULL, "reset check failed");
+    assert(_indexedFreeList[i].tail() == NULL, "reset check failed");
+    assert(_indexedFreeList[i].hint() == IndexSetSize, "reset check failed");
+  }
+}
+
+void CompactibleFreeListSpace::resetIndexedFreeListArray() {
+  for (size_t i = 1; i < IndexSetSize; i++) {
+    assert(_indexedFreeList[i].size() == (size_t) i,
+      "Indexed free list sizes are incorrect");
+    _indexedFreeList[i].reset(IndexSetSize);
+    assert(_indexedFreeList[i].count() == 0, "reset check failed");
+    assert(_indexedFreeList[i].head() == NULL, "reset check failed");
+    assert(_indexedFreeList[i].tail() == NULL, "reset check failed");
+    assert(_indexedFreeList[i].hint() == IndexSetSize, "reset check failed");
+  }
+}
+
+void CompactibleFreeListSpace::reset(MemRegion mr) {
+  resetIndexedFreeListArray();
+  dictionary()->reset();
+  if (BlockOffsetArrayUseUnallocatedBlock) {
+    assert(end() == mr.end(), "We are compacting to the bottom of CMS gen");
+    // Everything's allocated until proven otherwise.
+    _bt.set_unallocated_block(end());
+  }
+  if (!mr.is_empty()) {
+    assert(mr.word_size() >= MinChunkSize, "Chunk size is too small");
+    _bt.single_block(mr.start(), mr.word_size());
+    FreeChunk* fc = (FreeChunk*) mr.start();
+    fc->set_size(mr.word_size());
+    if (mr.word_size() >= IndexSetSize ) {
+      returnChunkToDictionary(fc);
+    } else {
+      _bt.verify_not_unallocated((HeapWord*)fc, fc->size());
+      _indexedFreeList[mr.word_size()].return_chunk_at_head(fc);
+    }
+    coalBirth(mr.word_size());
+  }
+  _promoInfo.reset();
+  _smallLinearAllocBlock._ptr = NULL;
+  _smallLinearAllocBlock._word_size = 0;
+}
+
+void CompactibleFreeListSpace::reset_after_compaction() {
+  // Reset the space to the new reality - one free chunk.
+  MemRegion mr(compaction_top(), end());
+  reset(mr);
+  // Now refill the linear allocation block(s) if possible.
+  if (_adaptive_freelists) {
+    refillLinearAllocBlocksIfNeeded();
+  } else {
+    // Place as much of mr in the linAB as we can get,
+    // provided it was big enough to go into the dictionary.
+    FreeChunk* fc = dictionary()->find_largest_dict();
+    if (fc != NULL) {
+      assert(fc->size() == mr.word_size(),
+             "Why was the chunk broken up?");
+      removeChunkFromDictionary(fc);
+      HeapWord* addr = (HeapWord*) fc;
+      _smallLinearAllocBlock.set(addr, fc->size() ,
+        1024*SmallForLinearAlloc, fc->size());
+      // Note that _unallocated_block is not updated here.
+    }
+  }
+}
+
+// Walks the entire dictionary, returning a coterminal
+// chunk, if it exists. Use with caution since it involves
+// a potentially complete walk of a potentially large tree.
+FreeChunk* CompactibleFreeListSpace::find_chunk_at_end() {
+
+  assert_lock_strong(&_freelistLock);
+
+  return dictionary()->find_chunk_ends_at(end());
+}
+
+
+#ifndef PRODUCT
+void CompactibleFreeListSpace::initializeIndexedFreeListArrayReturnedBytes() {
+  for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
+    _indexedFreeList[i].allocation_stats()->set_returned_bytes(0);
+  }
+}
+
+size_t CompactibleFreeListSpace::sumIndexedFreeListArrayReturnedBytes() {
+  size_t sum = 0;
+  for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
+    sum += _indexedFreeList[i].allocation_stats()->returned_bytes();
+  }
+  return sum;
+}
+
+size_t CompactibleFreeListSpace::totalCountInIndexedFreeLists() const {
+  size_t count = 0;
+  for (size_t i = IndexSetStart; i < IndexSetSize; i++) {
+    debug_only(
+      ssize_t total_list_count = 0;
+      for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
+         fc = fc->next()) {
+        total_list_count++;
+      }
+      assert(total_list_count ==  _indexedFreeList[i].count(),
+        "Count in list is incorrect");
+    )
+    count += _indexedFreeList[i].count();
+  }
+  return count;
+}
+
+size_t CompactibleFreeListSpace::totalCount() {
+  size_t num = totalCountInIndexedFreeLists();
+  num +=  dictionary()->total_count();
+  if (_smallLinearAllocBlock._word_size != 0) {
+    num++;
+  }
+  return num;
+}
+#endif
+
+bool CompactibleFreeListSpace::is_free_block(const HeapWord* p) const {
+  FreeChunk* fc = (FreeChunk*) p;
+  return fc->is_free();
+}
+
+size_t CompactibleFreeListSpace::used() const {
+  return capacity() - free();
+}
+
+size_t CompactibleFreeListSpace::free() const {
+  // "MT-safe, but not MT-precise"(TM), if you will: i.e.
+  // if you do this while the structures are in flux you
+  // may get an approximate answer only; for instance
+  // because there is concurrent allocation either
+  // directly by mutators or for promotion during a GC.
+  // It's "MT-safe", however, in the sense that you are guaranteed
+  // not to crash and burn, for instance, because of walking
+  // pointers that could disappear as you were walking them.
+  // The approximation is because the various components
+  // that are read below are not read atomically (and
+  // further the computation of totalSizeInIndexedFreeLists()
+  // is itself a non-atomic computation. The normal use of
+  // this is during a resize operation at the end of GC
+  // and at that time you are guaranteed to get the
+  // correct actual value. However, for instance, this is
+  // also read completely asynchronously by the "perf-sampler"
+  // that supports jvmstat, and you are apt to see the values
+  // flicker in such cases.
+  assert(_dictionary != NULL, "No _dictionary?");
+  return (_dictionary->total_chunk_size(DEBUG_ONLY(freelistLock())) +
+          totalSizeInIndexedFreeLists() +
+          _smallLinearAllocBlock._word_size) * HeapWordSize;
+}
+
+size_t CompactibleFreeListSpace::max_alloc_in_words() const {
+  assert(_dictionary != NULL, "No _dictionary?");
+  assert_locked();
+  size_t res = _dictionary->max_chunk_size();
+  res = MAX2(res, MIN2(_smallLinearAllocBlock._word_size,
+                       (size_t) SmallForLinearAlloc - 1));
+  // XXX the following could potentially be pretty slow;
+  // should one, pessimistically for the rare cases when res
+  // calculated above is less than IndexSetSize,
+  // just return res calculated above? My reasoning was that
+  // those cases will be so rare that the extra time spent doesn't
+  // really matter....
+  // Note: do not change the loop test i >= res + IndexSetStride
+  // to i > res below, because i is unsigned and res may be zero.
+  for (size_t i = IndexSetSize - 1; i >= res + IndexSetStride;
+       i -= IndexSetStride) {
+    if (_indexedFreeList[i].head() != NULL) {
+      assert(_indexedFreeList[i].count() != 0, "Inconsistent FreeList");
+      return i;
+    }
+  }
+  return res;
+}
+
+void LinearAllocBlock::print_on(outputStream* st) const {
+  st->print_cr(" LinearAllocBlock: ptr = " PTR_FORMAT ", word_size = " SIZE_FORMAT
+            ", refillsize = " SIZE_FORMAT ", allocation_size_limit = " SIZE_FORMAT,
+            p2i(_ptr), _word_size, _refillSize, _allocation_size_limit);
+}
+
+void CompactibleFreeListSpace::print_on(outputStream* st) const {
+  st->print_cr("COMPACTIBLE FREELIST SPACE");
+  st->print_cr(" Space:");
+  Space::print_on(st);
+
+  st->print_cr("promoInfo:");
+  _promoInfo.print_on(st);
+
+  st->print_cr("_smallLinearAllocBlock");
+  _smallLinearAllocBlock.print_on(st);
+
+  // dump_memory_block(_smallLinearAllocBlock->_ptr, 128);
+
+  st->print_cr(" _fitStrategy = %s, _adaptive_freelists = %s",
+               _fitStrategy?"true":"false", _adaptive_freelists?"true":"false");
+}
+
+void CompactibleFreeListSpace::print_indexed_free_lists(outputStream* st)
+const {
+  reportIndexedFreeListStatistics();
+  gclog_or_tty->print_cr("Layout of Indexed Freelists");
+  gclog_or_tty->print_cr("---------------------------");
+  AdaptiveFreeList<FreeChunk>::print_labels_on(st, "size");
+  for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
+    _indexedFreeList[i].print_on(gclog_or_tty);
+    for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
+         fc = fc->next()) {
+      gclog_or_tty->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ")  %s",
+                          p2i(fc), p2i((HeapWord*)fc + i),
+                          fc->cantCoalesce() ? "\t CC" : "");
+    }
+  }
+}
+
+void CompactibleFreeListSpace::print_promo_info_blocks(outputStream* st)
+const {
+  _promoInfo.print_on(st);
+}
+
+void CompactibleFreeListSpace::print_dictionary_free_lists(outputStream* st)
+const {
+  _dictionary->report_statistics();
+  st->print_cr("Layout of Freelists in Tree");
+  st->print_cr("---------------------------");
+  _dictionary->print_free_lists(st);
+}
+
+class BlkPrintingClosure: public BlkClosure {
+  const CMSCollector*             _collector;
+  const CompactibleFreeListSpace* _sp;
+  const CMSBitMap*                _live_bit_map;
+  const bool                      _post_remark;
+  outputStream*                   _st;
+public:
+  BlkPrintingClosure(const CMSCollector* collector,
+                     const CompactibleFreeListSpace* sp,
+                     const CMSBitMap* live_bit_map,
+                     outputStream* st):
+    _collector(collector),
+    _sp(sp),
+    _live_bit_map(live_bit_map),
+    _post_remark(collector->abstract_state() > CMSCollector::FinalMarking),
+    _st(st) { }
+  size_t do_blk(HeapWord* addr);
+};
+
+size_t BlkPrintingClosure::do_blk(HeapWord* addr) {
+  size_t sz = _sp->block_size_no_stall(addr, _collector);
+  assert(sz != 0, "Should always be able to compute a size");
+  if (_sp->block_is_obj(addr)) {
+    const bool dead = _post_remark && !_live_bit_map->isMarked(addr);
+    _st->print_cr(PTR_FORMAT ": %s object of size " SIZE_FORMAT "%s",
+      p2i(addr),
+      dead ? "dead" : "live",
+      sz,
+      (!dead && CMSPrintObjectsInDump) ? ":" : ".");
+    if (CMSPrintObjectsInDump && !dead) {
+      oop(addr)->print_on(_st);
+      _st->print_cr("--------------------------------------");
+    }
+  } else { // free block
+    _st->print_cr(PTR_FORMAT ": free block of size " SIZE_FORMAT "%s",
+      p2i(addr), sz, CMSPrintChunksInDump ? ":" : ".");
+    if (CMSPrintChunksInDump) {
+      ((FreeChunk*)addr)->print_on(_st);
+      _st->print_cr("--------------------------------------");
+    }
+  }
+  return sz;
+}
+
+void CompactibleFreeListSpace::dump_at_safepoint_with_locks(CMSCollector* c,
+  outputStream* st) {
+  st->print_cr("\n=========================");
+  st->print_cr("Block layout in CMS Heap:");
+  st->print_cr("=========================");
+  BlkPrintingClosure  bpcl(c, this, c->markBitMap(), st);
+  blk_iterate(&bpcl);
+
+  st->print_cr("\n=======================================");
+  st->print_cr("Order & Layout of Promotion Info Blocks");
+  st->print_cr("=======================================");
+  print_promo_info_blocks(st);
+
+  st->print_cr("\n===========================");
+  st->print_cr("Order of Indexed Free Lists");
+  st->print_cr("=========================");
+  print_indexed_free_lists(st);
+
+  st->print_cr("\n=================================");
+  st->print_cr("Order of Free Lists in Dictionary");
+  st->print_cr("=================================");
+  print_dictionary_free_lists(st);
+}
+
+
+void CompactibleFreeListSpace::reportFreeListStatistics() const {
+  assert_lock_strong(&_freelistLock);
+  assert(PrintFLSStatistics != 0, "Reporting error");
+  _dictionary->report_statistics();
+  if (PrintFLSStatistics > 1) {
+    reportIndexedFreeListStatistics();
+    size_t total_size = totalSizeInIndexedFreeLists() +
+                       _dictionary->total_chunk_size(DEBUG_ONLY(freelistLock()));
+    gclog_or_tty->print(" free=" SIZE_FORMAT " frag=%1.4f\n", total_size, flsFrag());
+  }
+}
+
+void CompactibleFreeListSpace::reportIndexedFreeListStatistics() const {
+  assert_lock_strong(&_freelistLock);
+  gclog_or_tty->print("Statistics for IndexedFreeLists:\n"
+                      "--------------------------------\n");
+  size_t total_size = totalSizeInIndexedFreeLists();
+  size_t   free_blocks = numFreeBlocksInIndexedFreeLists();
+  gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size);
+  gclog_or_tty->print("Max   Chunk Size: " SIZE_FORMAT "\n", maxChunkSizeInIndexedFreeLists());
+  gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks);
+  if (free_blocks != 0) {
+    gclog_or_tty->print("Av.  Block  Size: " SIZE_FORMAT "\n", total_size/free_blocks);
+  }
+}
+
+size_t CompactibleFreeListSpace::numFreeBlocksInIndexedFreeLists() const {
+  size_t res = 0;
+  for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
+    debug_only(
+      ssize_t recount = 0;
+      for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
+         fc = fc->next()) {
+        recount += 1;
+      }
+      assert(recount == _indexedFreeList[i].count(),
+        "Incorrect count in list");
+    )
+    res += _indexedFreeList[i].count();
+  }
+  return res;
+}
+
+size_t CompactibleFreeListSpace::maxChunkSizeInIndexedFreeLists() const {
+  for (size_t i = IndexSetSize - 1; i != 0; i -= IndexSetStride) {
+    if (_indexedFreeList[i].head() != NULL) {
+      assert(_indexedFreeList[i].count() != 0, "Inconsistent FreeList");
+      return (size_t)i;
+    }
+  }
+  return 0;
+}
+
+void CompactibleFreeListSpace::set_end(HeapWord* value) {
+  HeapWord* prevEnd = end();
+  assert(prevEnd != value, "unnecessary set_end call");
+  assert(prevEnd == NULL || !BlockOffsetArrayUseUnallocatedBlock || value >= unallocated_block(),
+        "New end is below unallocated block");
+  _end = value;
+  if (prevEnd != NULL) {
+    // Resize the underlying block offset table.
+    _bt.resize(pointer_delta(value, bottom()));
+    if (value <= prevEnd) {
+      assert(!BlockOffsetArrayUseUnallocatedBlock || value >= unallocated_block(),
+             "New end is below unallocated block");
+    } else {
+      // Now, take this new chunk and add it to the free blocks.
+      // Note that the BOT has not yet been updated for this block.
+      size_t newFcSize = pointer_delta(value, prevEnd);
+      // XXX This is REALLY UGLY and should be fixed up. XXX
+      if (!_adaptive_freelists && _smallLinearAllocBlock._ptr == NULL) {
+        // Mark the boundary of the new block in BOT
+        _bt.mark_block(prevEnd, value);
+        // put it all in the linAB
+        MutexLockerEx x(parDictionaryAllocLock(),
+                        Mutex::_no_safepoint_check_flag);
+        _smallLinearAllocBlock._ptr = prevEnd;
+        _smallLinearAllocBlock._word_size = newFcSize;
+        repairLinearAllocBlock(&_smallLinearAllocBlock);
+        // Births of chunks put into a LinAB are not recorded.  Births
+        // of chunks as they are allocated out of a LinAB are.
+      } else {
+        // Add the block to the free lists, if possible coalescing it
+        // with the last free block, and update the BOT and census data.
+        addChunkToFreeListsAtEndRecordingStats(prevEnd, newFcSize);
+      }
+    }
+  }
+}
+
+class FreeListSpace_DCTOC : public Filtering_DCTOC {
+  CompactibleFreeListSpace* _cfls;
+  CMSCollector* _collector;
+protected:
+  // Override.
+#define walk_mem_region_with_cl_DECL(ClosureType)                       \
+  virtual void walk_mem_region_with_cl(MemRegion mr,                    \
+                                       HeapWord* bottom, HeapWord* top, \
+                                       ClosureType* cl);                \
+      void walk_mem_region_with_cl_par(MemRegion mr,                    \
+                                       HeapWord* bottom, HeapWord* top, \
+                                       ClosureType* cl);                \
+    void walk_mem_region_with_cl_nopar(MemRegion mr,                    \
+                                       HeapWord* bottom, HeapWord* top, \
+                                       ClosureType* cl)
+  walk_mem_region_with_cl_DECL(ExtendedOopClosure);
+  walk_mem_region_with_cl_DECL(FilteringClosure);
+
+public:
+  FreeListSpace_DCTOC(CompactibleFreeListSpace* sp,
+                      CMSCollector* collector,
+                      ExtendedOopClosure* cl,
+                      CardTableModRefBS::PrecisionStyle precision,
+                      HeapWord* boundary) :
+    Filtering_DCTOC(sp, cl, precision, boundary),
+    _cfls(sp), _collector(collector) {}
+};
+
+// We de-virtualize the block-related calls below, since we know that our
+// space is a CompactibleFreeListSpace.
+
+#define FreeListSpace_DCTOC__walk_mem_region_with_cl_DEFN(ClosureType)          \
+void FreeListSpace_DCTOC::walk_mem_region_with_cl(MemRegion mr,                 \
+                                                 HeapWord* bottom,              \
+                                                 HeapWord* top,                 \
+                                                 ClosureType* cl) {             \
+   bool is_par = GenCollectedHeap::heap()->n_par_threads() > 0;                 \
+   if (is_par) {                                                                \
+     assert(GenCollectedHeap::heap()->n_par_threads() ==                        \
+            GenCollectedHeap::heap()->workers()->active_workers(), "Mismatch"); \
+     walk_mem_region_with_cl_par(mr, bottom, top, cl);                          \
+   } else {                                                                     \
+     walk_mem_region_with_cl_nopar(mr, bottom, top, cl);                        \
+   }                                                                            \
+}                                                                               \
+void FreeListSpace_DCTOC::walk_mem_region_with_cl_par(MemRegion mr,             \
+                                                      HeapWord* bottom,         \
+                                                      HeapWord* top,            \
+                                                      ClosureType* cl) {        \
+  /* Skip parts that are before "mr", in case "block_start" sent us             \
+     back too far. */                                                           \
+  HeapWord* mr_start = mr.start();                                              \
+  size_t bot_size = _cfls->CompactibleFreeListSpace::block_size(bottom);        \
+  HeapWord* next = bottom + bot_size;                                           \
+  while (next < mr_start) {                                                     \
+    bottom = next;                                                              \
+    bot_size = _cfls->CompactibleFreeListSpace::block_size(bottom);             \
+    next = bottom + bot_size;                                                   \
+  }                                                                             \
+                                                                                \
+  while (bottom < top) {                                                        \
+    if (_cfls->CompactibleFreeListSpace::block_is_obj(bottom) &&                \
+        !_cfls->CompactibleFreeListSpace::obj_allocated_since_save_marks(       \
+                    oop(bottom)) &&                                             \
+        !_collector->CMSCollector::is_dead_obj(oop(bottom))) {                  \
+      size_t word_sz = oop(bottom)->oop_iterate(cl, mr);                        \
+      bottom += _cfls->adjustObjectSize(word_sz);                               \
+    } else {                                                                    \
+      bottom += _cfls->CompactibleFreeListSpace::block_size(bottom);            \
+    }                                                                           \
+  }                                                                             \
+}                                                                               \
+void FreeListSpace_DCTOC::walk_mem_region_with_cl_nopar(MemRegion mr,           \
+                                                        HeapWord* bottom,       \
+                                                        HeapWord* top,          \
+                                                        ClosureType* cl) {      \
+  /* Skip parts that are before "mr", in case "block_start" sent us             \
+     back too far. */                                                           \
+  HeapWord* mr_start = mr.start();                                              \
+  size_t bot_size = _cfls->CompactibleFreeListSpace::block_size_nopar(bottom);  \
+  HeapWord* next = bottom + bot_size;                                           \
+  while (next < mr_start) {                                                     \
+    bottom = next;                                                              \
+    bot_size = _cfls->CompactibleFreeListSpace::block_size_nopar(bottom);       \
+    next = bottom + bot_size;                                                   \
+  }                                                                             \
+                                                                                \
+  while (bottom < top) {                                                        \
+    if (_cfls->CompactibleFreeListSpace::block_is_obj_nopar(bottom) &&          \
+        !_cfls->CompactibleFreeListSpace::obj_allocated_since_save_marks(       \
+                    oop(bottom)) &&                                             \
+        !_collector->CMSCollector::is_dead_obj(oop(bottom))) {                  \
+      size_t word_sz = oop(bottom)->oop_iterate(cl, mr);                        \
+      bottom += _cfls->adjustObjectSize(word_sz);                               \
+    } else {                                                                    \
+      bottom += _cfls->CompactibleFreeListSpace::block_size_nopar(bottom);      \
+    }                                                                           \
+  }                                                                             \
+}
+
+// (There are only two of these, rather than N, because the split is due
+// only to the introduction of the FilteringClosure, a local part of the
+// impl of this abstraction.)
+FreeListSpace_DCTOC__walk_mem_region_with_cl_DEFN(ExtendedOopClosure)
+FreeListSpace_DCTOC__walk_mem_region_with_cl_DEFN(FilteringClosure)
+
+DirtyCardToOopClosure*
+CompactibleFreeListSpace::new_dcto_cl(ExtendedOopClosure* cl,
+                                      CardTableModRefBS::PrecisionStyle precision,
+                                      HeapWord* boundary) {
+  return new FreeListSpace_DCTOC(this, _collector, cl, precision, boundary);
+}
+
+
+// Note on locking for the space iteration functions:
+// since the collector's iteration activities are concurrent with
+// allocation activities by mutators, absent a suitable mutual exclusion
+// mechanism the iterators may go awry. For instance a block being iterated
+// may suddenly be allocated or divided up and part of it allocated and
+// so on.
+
+// Apply the given closure to each block in the space.
+void CompactibleFreeListSpace::blk_iterate_careful(BlkClosureCareful* cl) {
+  assert_lock_strong(freelistLock());
+  HeapWord *cur, *limit;
+  for (cur = bottom(), limit = end(); cur < limit;
+       cur += cl->do_blk_careful(cur));
+}
+
+// Apply the given closure to each block in the space.
+void CompactibleFreeListSpace::blk_iterate(BlkClosure* cl) {
+  assert_lock_strong(freelistLock());
+  HeapWord *cur, *limit;
+  for (cur = bottom(), limit = end(); cur < limit;
+       cur += cl->do_blk(cur));
+}
+
+// Apply the given closure to each oop in the space.
+void CompactibleFreeListSpace::oop_iterate(ExtendedOopClosure* cl) {
+  assert_lock_strong(freelistLock());
+  HeapWord *cur, *limit;
+  size_t curSize;
+  for (cur = bottom(), limit = end(); cur < limit;
+       cur += curSize) {
+    curSize = block_size(cur);
+    if (block_is_obj(cur)) {
+      oop(cur)->oop_iterate(cl);
+    }
+  }
+}
+