hotspot/src/share/vm/memory/genRemSet.hpp
Print this page
rev 611 : Merge
@@ -1,10 +1,10 @@
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)genRemSet.hpp 1.23 07/05/05 17:05:50 JVM"
#endif
/*
- * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2001-2008 Sun Microsystems, Inc. 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.
@@ -43,10 +43,11 @@
CardTable,
Other
};
GenRemSet(BarrierSet * bs) : _bs(bs) {}
+ GenRemSet() : _bs(NULL) {}
virtual Name rs_kind() = 0;
// These are for dynamic downcasts. Unfortunately that it names the
// possible subtypes (but not that they are subtypes!) Return NULL if
@@ -54,10 +55,13 @@
virtual CardTableRS* as_CardTableRS() { return NULL; }
// Return the barrier set associated with "this."
BarrierSet* bs() { return _bs; }
+ // Set the barrier set.
+ void set_bs(BarrierSet* bs) { _bs = bs; }
+
// Do any (sequential) processing necessary to prepare for (possibly
// "parallel", if that arg is true) calls to younger_refs_iterate.
virtual void prepare_for_younger_refs_iterate(bool parallel) = 0;
// Apply the "do_oop" method of "blk" to (exactly) all oop locations
@@ -69,17 +73,17 @@
virtual void younger_refs_in_space_iterate(Space* sp,
OopsInGenClosure* cl) = 0;
// This method is used to notify the remembered set that "new_val" has
// been written into "field" by the garbage collector.
- void write_ref_field_gc(oop* field, oop new_val);
+ void write_ref_field_gc(void* field, oop new_val);
protected:
- virtual void write_ref_field_gc_work(oop* field, oop new_val) = 0;
+ virtual void write_ref_field_gc_work(void* field, oop new_val) = 0;
public:
// A version of the above suitable for use by parallel collectors.
- virtual void write_ref_field_gc_par(oop* field, oop new_val) = 0;
+ virtual void write_ref_field_gc_par(void* field, oop new_val) = 0;
// Resize one of the regions covered by the remembered set.
virtual void resize_covered_region(MemRegion new_region) = 0;
// If the rem set imposes any alignment restrictions on boundaries
@@ -92,12 +96,19 @@
static uintx max_alignment_constraint(Name nm);
virtual void verify() = 0;
// Verify that the remembered set has no entries for
- // the heap interval denoted by mr.
- virtual void verify_empty(MemRegion mr) = 0;
+ // the heap interval denoted by mr. If there are any
+ // alignment constraints on the remembered set, only the
+ // part of the region that is aligned is checked.
+ //
+ // alignment boundaries
+ // +--------+-------+--------+-------+
+ // [ region mr )
+ // [ part checked )
+ virtual void verify_aligned_region_empty(MemRegion mr) = 0;
// If appropriate, print some information about the remset on "tty".
virtual void print() {}
// Informs the RS that the given memregion contains no references to
@@ -110,11 +121,14 @@
// remembered set should also be processed/cleared.
virtual void clear_into_younger(Generation* gen, bool clear_perm) = 0;
// Informs the RS that refs in the given "mr" may have changed
// arbitrarily, and therefore may contain old-to-young pointers.
- virtual void invalidate(MemRegion mr) = 0;
+ // If "whole heap" is true, then this invalidation is part of an
+ // invalidation of the whole heap, which an implementation might
+ // handle differently than that of a sub-part of the heap.
+ virtual void invalidate(MemRegion mr, bool whole_heap = false) = 0;
// Informs the RS that refs in this generation
// may have changed arbitrarily, and therefore may contain
// old-to-young pointers in arbitrary locations. The parameter
// younger indicates if the same should be done for younger generations