< prev index next >

src/share/vm/gc/cms/compactibleFreeListSpace.cpp

Print this page
rev 8615 : CMSParallelFullGC: Parallel version of CMS Full GC.

@@ -27,10 +27,11 @@
 #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/gcTraceTime.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"

@@ -2065,31 +2066,45 @@
   // In the future we might want to add in fragmentation stats --
   // including erosion of the "mountain" into this decision as well.
   return !adaptive_freelists() && linearAllocationWouldFail();
 }
 
+#define cfls_obj_size(q) CompactibleFreeListSpace::adjustObjectSize(oop(q)->size())
+DECLARE_PMS_SPECIALIZED_CODE(CompactibleFreeListSpace, cfls_obj_size);
+
 // Support for compaction
 void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
+  if (CMSParallelFullGC) {
+    pms_prepare_for_compaction_work(cp);
+  } else {
   scan_and_forward(this, cp);
+  }
   // Prepare_for_compaction() uses the space between live objects
   // so that later phase can skip dead space quickly.  So verification
   // of the free lists doesn't work after.
 }
 
 void CompactibleFreeListSpace::adjust_pointers() {
+  if (CMSParallelFullGC) {
+    pms_adjust_pointers_work();
+  } else {
   // In other versions of adjust_pointers(), a bail out
   // based on the amount of live data in the generation
   // (i.e., if 0, bail out) may be used.
   // Cannot test used() == 0 here because the free lists have already
   // been mangled by the compaction.
-
   scan_and_adjust_pointers(this);
+  }
   // See note about verification in prepare_for_compaction().
 }
 
 void CompactibleFreeListSpace::compact() {
+  if (CMSParallelFullGC) {
+    pms_compact_work();
+  } else {
   scan_and_compact(this);
+  }
 }
 
 // Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
 // where fbs is free block sizes
 double CompactibleFreeListSpace::flsFrag() const {
< prev index next >