hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp
changeset 2152 99356e7f31b1
parent 2142 032f4652700c
child 2154 72a9b7284ccf
--- 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; }
+};
+