src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp

Print this page
rev 7084 : [mq]: demacro

*** 2093,2126 **** // including erosion of the "mountain" into this decision as well. return !adaptive_freelists() && linearAllocationWouldFail(); } // Support for compaction - void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) { ! SCAN_AND_FORWARD(cp,end,block_is_obj,block_size); // 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. } - #define obj_size(q) adjustObjectSize(oop(q)->size()) - #define adjust_obj_size(s) adjustObjectSize(s) - void CompactibleFreeListSpace::adjust_pointers() { // 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(adjust_obj_size); // See note about verification in prepare_for_compaction(). } void CompactibleFreeListSpace::compact() { ! SCAN_AND_COMPACT(obj_size); } // Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2] // where fbs is free block sizes double CompactibleFreeListSpace::flsFrag() const { --- 2093,2122 ---- // including erosion of the "mountain" into this decision as well. return !adaptive_freelists() && linearAllocationWouldFail(); } // Support for compaction void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) { ! 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() { // 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() { ! 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 {