--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Mon Mar 09 11:32:57 2009 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Tue Mar 10 00:47:05 2009 -0700
@@ -215,3 +215,27 @@
int n() { return _n; };
HeapWord* start_first() { return _start_first; }
};
+
+class UpdateRSOopClosure: public OopClosure {
+ HeapRegion* _from;
+ HRInto_G1RemSet* _rs;
+ int _worker_i;
+public:
+ UpdateRSOopClosure(HRInto_G1RemSet* rs, int worker_i = 0) :
+ _from(NULL), _rs(rs), _worker_i(worker_i) {
+ guarantee(_rs != NULL, "Requires an HRIntoG1RemSet");
+ }
+
+ void set_from(HeapRegion* from) {
+ assert(from != NULL, "from region must be non-NULL");
+ _from = from;
+ }
+
+ virtual void do_oop(narrowOop* p);
+ virtual void do_oop(oop* p);
+
+ // Override: this closure is idempotent.
+ // bool idempotent() { return true; }
+ bool apply_to_weak_ref_discovered_field() { return true; }
+};
+