src/hotspot/share/gc/g1/g1CollectedHeap.cpp
changeset 47624 b055cb5170f5
parent 47216 71c04702a3d5
child 47634 6a0c42c40cd1
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Oct 13 14:02:01 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Oct 13 15:08:56 2017 +0200
@@ -141,13 +141,6 @@
   reset_from_card_cache(start_idx, num_regions);
 }
 
-// Returns true if the reference points to an object that
-// can move in an incremental collection.
-bool G1CollectedHeap::is_scavengable(const void* p) {
-  HeapRegion* hr = heap_region_containing(p);
-  return !hr->is_pinned();
-}
-
 // Private methods.
 
 HeapRegion*
@@ -5323,17 +5316,20 @@
   void do_oop(narrowOop* p) { do_oop_work(p); }
 };
 
+// Returns true if the reference points to an object that
+// can move in an incremental collection.
+bool G1CollectedHeap::is_scavengable(oop obj) {
+  HeapRegion* hr = heap_region_containing(obj);
+  return !hr->is_pinned();
+}
+
 void G1CollectedHeap::register_nmethod(nmethod* nm) {
-  CollectedHeap::register_nmethod(nm);
-
   guarantee(nm != NULL, "sanity");
   RegisterNMethodOopClosure reg_cl(this, nm);
   nm->oops_do(&reg_cl);
 }
 
 void G1CollectedHeap::unregister_nmethod(nmethod* nm) {
-  CollectedHeap::unregister_nmethod(nm);
-
   guarantee(nm != NULL, "sanity");
   UnregisterNMethodOopClosure reg_cl(this, nm);
   nm->oops_do(&reg_cl, true);