dead code in G1CollectedHeap::is_scavengable

Christian Thalinger christian.thalinger at oracle.com
Wed May 29 02:40:39 UTC 2013


I think it's side-effect free so the compiler removes it anyway but still…

-- Chris


diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -459,8 +459,6 @@
 // Returns true if the reference points to an object that
 // can move in an incremental collecction.
 bool G1CollectedHeap::is_scavengable(const void* p) {
-  G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  G1CollectorPolicy* g1p = g1h->g1_policy();
   HeapRegion* hr = heap_region_containing(p);
   if (hr == NULL) {
      // null




More information about the hotspot-gc-dev mailing list