< prev index next >
src/share/vm/gc/shared/space.hpp
Print this page
rev 8615 : CMSParallelFullGC: Parallel version of CMS Full GC.
@@ -235,10 +235,17 @@
// IF "this" is a ContiguousSpace, return it, else return NULL.
virtual ContiguousSpace* toContiguousSpace() {
return NULL;
}
+ // IF "this" is a CompactibleSpace, return it, else return NULL.
+ virtual CompactibleSpace* toCompactibleSpace() {
+ return NULL;
+ }
+
+ virtual bool isCompactibleFreeListSpace() { return false; }
+
// Debugging
virtual void verify() const = 0;
};
// A MemRegionClosure (ResourceObj) whose "do_MemRegion" function applies an
@@ -352,10 +359,14 @@
// should be effective during the compaction operations must provide a corresponding
// definition of scanned_block_size/scanned_block_is_obj respectively.
class CompactibleSpace: public Space {
friend class VMStructs;
friend class CompactibleFreeListSpace;
+ friend class PMSPerRegionForwardClosure_ContiguousSpace;
+ friend class PMSPerRegionForwardClosure_CompactibleFreeListSpace;
+ friend class PMSFindRegionSplitPointClosure;
+ friend class ContiguousSpace;
private:
HeapWord* _compaction_top;
CompactibleSpace* _next_compaction_space;
// Auxiliary functions for scan_and_{forward,adjust_pointers,compact} support.
@@ -409,14 +420,17 @@
// and leaves the "compaction_top" of the final value of
// "cp->compaction_space" up-to-date. Offset tables may be updated in
// this phase as if the final copy had occurred; if so, "cp->threshold"
// indicates when the next such action should be taken.
virtual void prepare_for_compaction(CompactPoint* cp) = 0;
+ virtual void pms_prepare_for_compaction_work(CompactPoint* cp) = 0;
// MarkSweep support phase3
virtual void adjust_pointers();
+ void pms_adjust_pointers_work();
// MarkSweep support phase4
virtual void compact();
+ virtual void pms_compact_work() = 0;
// The maximum percentage of objects that can be dead in the compacted
// live part of a compacted space ("deadwood" support.)
virtual size_t allowed_dead_ratio() const { return 0; };
@@ -443,14 +457,34 @@
HeapWord* compact_top);
// Return a size with adjustments as required of the space.
virtual size_t adjust_object_size_v(size_t size) const { return size; }
+ // Checked dynamic downcasts.
+ virtual CompactibleSpace* toCompactibleSpace() {
+ return this;
+ }
+
+ void set_live_range_for_compaction(HeapWord* beginning_of_live,
+ HeapWord* end_of_live,
+ HeapWord* first_moved) {
+ _beginning_of_live = beginning_of_live;
+ _end_of_live = end_of_live;
+ _first_moved = first_moved;
+ }
+
+ HeapWord* first_dead() { return _first_dead; }
+ HeapWord* end_of_live() { return _end_of_live; }
+ HeapWord* beginning_of_live() { return _beginning_of_live; }
+ HeapWord* first_moved() { return _first_moved; }
+
protected:
// Used during compaction.
HeapWord* _first_dead;
HeapWord* _end_of_live;
+ HeapWord* _beginning_of_live;
+ HeapWord* _first_moved;
// Minimum size of a free block.
virtual size_t minimum_free_block_size() const { return 0; }
// This the function is invoked when an allocation of an object covering
@@ -676,10 +710,13 @@
virtual void verify() const;
// Used to increase collection frequency. "factor" of 0 means entire
// space.
void allocate_temporary_filler(int factor);
+
+ void pms_prepare_for_compaction_work(CompactPoint* cp);
+ void pms_compact_work();
};
// A dirty card to oop closure that does filtering.
// It knows how to filter out objects that are outside of the _boundary.
< prev index next >