Merge
authorstefank
Thu, 26 Mar 2015 11:00:49 +0000
changeset 29793 ddd5618b5804
parent 29792 8c6fa07f0869 (diff)
parent 29704 2a1a74472bfd (current diff)
child 29794 2dcbd946f9a8
Merge
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -66,7 +66,6 @@
 #include "memory/iterator.hpp"
 #include "memory/referenceProcessor.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/vmThread.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. 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
@@ -33,6 +33,7 @@
 #include "gc_implementation/g1/g1MarkSweep.hpp"
 #include "gc_implementation/g1/g1RootProcessor.hpp"
 #include "gc_implementation/g1/g1StringDedup.hpp"
+#include "gc_implementation/shared/markSweep.inline.hpp"
 #include "gc_implementation/shared/gcHeapSummary.hpp"
 #include "gc_implementation/shared/gcTimer.hpp"
 #include "gc_implementation/shared/gcTrace.hpp"
@@ -217,7 +218,7 @@
         // We must adjust the pointers on the single H object.
         oop obj = oop(r->bottom());
         // point all the oops to the new location
-        obj->adjust_pointers();
+        MarkSweep::adjust_pointers(obj);
       }
     } else {
       // This really ought to be "as_CompactibleSpace"...
--- a/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -27,7 +27,6 @@
 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
 #include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "runtime/prefetch.inline.hpp"
 
 G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -46,7 +46,6 @@
 #include "memory/space.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/handles.inline.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -26,12 +26,11 @@
 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
-#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
+#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
 #include "gc_implementation/parallelScavenge/psTasks.hpp"
 #include "gc_implementation/parallelScavenge/psYoungGen.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.psgc.inline.hpp"
 #include "runtime/prefetch.inline.hpp"
 
 // Checks an individual oop for missing precise marks. Mark
@@ -291,7 +290,7 @@
             Prefetch::write(p, interval);
             oop m = oop(p);
             assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)));
-            m->push_contents(pm);
+            pm->push_contents(m);
             p += m->size();
           }
           pm->drain_stacks_cond_depth();
@@ -299,7 +298,7 @@
           while (p < to) {
             oop m = oop(p);
             assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)));
-            m->push_contents(pm);
+            pm->push_contents(m);
             p += m->size();
           }
           pm->drain_stacks_cond_depth();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -27,6 +27,7 @@
 #include "code/codeCache.hpp"
 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
 #include "gc_implementation/parallelScavenge/pcTasks.hpp"
+#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
 #include "gc_implementation/shared/gcTimer.hpp"
 #include "gc_implementation/shared/gcTraceTime.hpp"
@@ -34,7 +35,6 @@
 #include "memory/universe.hpp"
 #include "oops/objArrayKlass.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/jniHandles.hpp"
@@ -221,12 +221,11 @@
   int random_seed = 17;
   do {
     while (ParCompactionManager::steal_objarray(which, &random_seed, task)) {
-      ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
-      k->oop_follow_contents(cm, task.obj(), task.index());
+      cm->follow_contents((objArrayOop)task.obj(), task.index());
       cm->follow_marking_stacks();
     }
     while (ParCompactionManager::steal(which, &random_seed, obj)) {
-      obj->follow_contents(cm);
+      cm->follow_contents(obj);
       cm->follow_marking_stacks();
     }
   } while (!terminator()->offer_termination());
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. 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
@@ -28,12 +28,11 @@
 #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
 #include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
-#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
+#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psOldGen.hpp"
 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
 #include "oops/objArrayKlass.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "utilities/stack.inline.hpp"
 
@@ -180,17 +179,16 @@
     // Drain the overflow stack first, to allow stealing from the marking stack.
     oop obj;
     while (marking_stack()->pop_overflow(obj)) {
-      obj->follow_contents(this);
+      follow_contents(obj);
     }
     while (marking_stack()->pop_local(obj)) {
-      obj->follow_contents(this);
+      follow_contents(obj);
     }
 
     // Process ObjArrays one at a time to avoid marking stack bloat.
     ObjArrayTask task;
     if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) {
-      ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
-      k->oop_follow_contents(this, task.obj(), task.index());
+      follow_contents((objArrayOop)task.obj(), task.index());
     }
   } while (!marking_stacks_empty());
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. 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
@@ -196,6 +196,10 @@
   // Process tasks remaining on any stack
   void drain_region_stacks();
 
+  void follow_contents(oop obj);
+  void follow_contents(objArrayOop array, int index);
+
+  void update_contents(oop obj);
 };
 
 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015 Oracle and/or its affiliates. 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
@@ -27,6 +27,8 @@
 
 #include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
+#include "oops/objArrayKlass.inline.hpp"
+#include "oops/oop.pcgc.inline.hpp"
 
 void ParCompactionManager::push_objarray(oop obj, size_t index)
 {
@@ -46,4 +48,17 @@
   region_stack()->push(index);
 }
 
+inline void ParCompactionManager::follow_contents(oop obj) {
+  obj->follow_contents(this);
+}
+
+inline void ParCompactionManager::follow_contents(objArrayOop obj, int index) {
+  ObjArrayKlass* k = (ObjArrayKlass*)obj->klass();
+  k->oop_follow_contents(this, obj, index);
+}
+
+inline void ParCompactionManager::update_contents(oop obj) {
+  obj->update_contents(this);
+}
+
 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. 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
@@ -303,7 +303,7 @@
 
     while (q < end) {
       // point all the oops to the new location
-      size_t size = oop(q)->adjust_pointers();
+      size_t size = MarkSweep::adjust_pointers(oop(q));
       q += size;
     }
 
@@ -324,7 +324,7 @@
     if (oop(q)->is_gc_marked()) {
       // q is alive
       // point all the oops to the new location
-      size_t size = oop(q)->adjust_pointers();
+      size_t size = MarkSweep::adjust_pointers(oop(q));
       debug_only(prev_q = q);
       q += size;
     } else {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -50,7 +50,6 @@
 #include "memory/referenceProcessor.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/safepoint.hpp"
@@ -2776,6 +2775,11 @@
 }
 #endif  // #ifdef ASSERT
 
+inline void UpdateOnlyClosure::do_addr(HeapWord* addr) {
+  _start_array->allocate_block(addr);
+  compaction_manager()->update_contents(oop(addr));
+}
+
 // Update interior oops in the ranges of regions [beg_region, end_region).
 void
 PSParallelCompact::update_and_deadwood_in_dense_prefix(ParCompactionManager* cm,
@@ -2876,7 +2880,7 @@
       if (start_array != NULL) {
         start_array->allocate_block(addr);
       }
-      oop(addr)->update_contents(cm);
+      cm->update_contents(oop(addr));
       assert(oop(addr)->is_oop_or_null(), err_msg("Expected an oop or NULL at " PTR_FORMAT, p2i(oop(addr))));
     }
   }
@@ -3360,7 +3364,7 @@
   }
 
   oop moved_oop = (oop) destination();
-  moved_oop->update_contents(compaction_manager());
+  compaction_manager()->update_contents(moved_oop);
   assert(moved_oop->is_oop_or_null(), err_msg("Expected an oop or NULL at " PTR_FORMAT, p2i(moved_oop)));
 
   update_state(words);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1025,9 +1025,6 @@
                             bool maximum_heap_compaction,
                             ParallelOldTracer *gc_tracer);
 
-  template <class T>
-  static inline void follow_root(ParCompactionManager* cm, T* p);
-
   // Compute the dense prefix for the designated space.  This is an experimental
   // implementation currently not used in production.
   static HeapWord* compute_dense_prefix_via_density(const SpaceId id,
@@ -1336,23 +1333,6 @@
 }
 
 template <class T>
-inline void PSParallelCompact::follow_root(ParCompactionManager* cm, T* p) {
-  assert(!Universe::heap()->is_in_reserved(p),
-         "roots shouldn't be things within the heap");
-
-  T heap_oop = oopDesc::load_heap_oop(p);
-  if (!oopDesc::is_null(heap_oop)) {
-    oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
-    if (mark_bitmap()->is_unmarked(obj)) {
-      if (mark_obj(obj)) {
-        obj->follow_contents(cm);
-      }
-    }
-  }
-  cm->follow_marking_stacks();
-}
-
-template <class T>
 inline void PSParallelCompact::mark_and_push(ParCompactionManager* cm, T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
   if (!oopDesc::is_null(heap_oop)) {
@@ -1524,12 +1504,6 @@
   inline void do_addr(HeapWord* addr);
 };
 
-inline void UpdateOnlyClosure::do_addr(HeapWord* addr)
-{
-  _start_array->allocate_block(addr);
-  oop(addr)->update_contents(compaction_manager());
-}
-
 class FillClosure: public ParMarkBitMapClosure
 {
 public:
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -33,7 +33,6 @@
 #include "memory/memRegion.hpp"
 #include "memory/padded.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.psgc.inline.hpp"
 #include "utilities/stack.inline.hpp"
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
@@ -325,7 +324,7 @@
 
     _promotion_failed_info.register_copy_failure(obj->size());
 
-    obj->push_contents(this);
+    push_contents(obj);
 
     // Save the mark if needed
     PSScavenge::oop_promotion_failed(obj, obj_mark);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. 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
@@ -212,6 +212,8 @@
   template <class T> inline void claim_or_forward_depth(T* p);
 
   TASKQUEUE_STATS_ONLY(inline void record_steal(StarTask& p);)
+
+  void push_contents(oop obj);
 };
 
 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. 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
@@ -91,6 +91,9 @@
   }
 }
 
+inline void PSPromotionManager::push_contents(oop obj) {
+  obj->push_contents(this);
+}
 //
 // This method is pretty bulky. It would be nice to split it up
 // into smaller submethods, but we need to be careful not to hurt
@@ -227,7 +230,7 @@
         TASKQUEUE_STATS_ONLY(++_arrays_chunked; ++_masked_pushes);
       } else {
         // we'll just push its contents
-        new_obj->push_contents(this);
+        push_contents(new_obj);
       }
     }  else {
       // We lost, someone else "owns" this object
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -46,7 +46,6 @@
 #include "memory/referenceProcessor.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.psgc.inline.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/handles.inline.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -35,7 +35,6 @@
 #include "memory/iterator.hpp"
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
-#include "oops/oop.psgc.inline.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/vmThread.hpp"
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -64,18 +64,22 @@
   MarkSweep::follow_cld_closure.do_cld(cld);
 }
 
+void MarkSweep::follow_array(objArrayOop array, int index) {
+  ObjArrayKlass* k = (ObjArrayKlass*)array->klass();
+  k->oop_follow_contents(array, index);
+}
+
 void MarkSweep::follow_stack() {
   do {
     while (!_marking_stack.is_empty()) {
       oop obj = _marking_stack.pop();
       assert (obj->is_gc_marked(), "p must be marked");
-      obj->follow_contents();
+      follow_object(obj);
     }
     // Process ObjArrays one at a time to avoid marking stack bloat.
     if (!_objarray_stack.is_empty()) {
       ObjArrayTask task = _objarray_stack.pop();
-      ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
-      k->oop_follow_contents(task.obj(), task.index());
+      follow_array(objArrayOop(task.obj()), task.index());
     }
   } while (!_marking_stack.is_empty() || !_objarray_stack.is_empty());
 }
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -160,10 +160,16 @@
 
   static void follow_stack();   // Empty marking stack.
 
+  static void follow_object(oop obj);
+
+  static void follow_array(objArrayOop array, int index);
+
   static void follow_klass(Klass* klass);
 
   static void follow_class_loader(ClassLoaderData* cld);
 
+  static int adjust_pointers(oop obj);
+
   static void preserve_mark(oop p, markOop mark);
                                 // Save the mark word so it can be restored later
   static void adjust_marks();   // Adjust the pointers in the preserved marks table
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. 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
@@ -58,6 +58,10 @@
   MarkSweep::mark_and_push(&op);
 }
 
+inline void MarkSweep::follow_object(oop obj) {
+  obj->follow_contents();
+}
+
 template <class T> inline void MarkSweep::follow_root(T* p) {
   assert(!Universe::heap()->is_in_reserved(p),
          "roots shouldn't be things within the heap");
@@ -66,7 +70,7 @@
     oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
     if (!obj->mark()->is_marked()) {
       mark_object(obj);
-      obj->follow_contents();
+      follow_object(obj);
     }
   }
   follow_stack();
@@ -90,6 +94,10 @@
   _objarray_stack.push(task);
 }
 
+inline int MarkSweep::adjust_pointers(oop obj) {
+  return obj->adjust_pointers();
+}
+
 template <class T> inline void MarkSweep::adjust_pointer(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
   if (!oopDesc::is_null(heap_oop)) {
--- a/hotspot/src/share/vm/memory/space.inline.hpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/memory/space.inline.hpp	Thu Mar 26 11:00:49 2015 +0000
@@ -214,7 +214,7 @@
       assert(space->block_is_obj(q), "should be at block boundaries, and should be looking at objs");
 
       // point all the oops to the new location
-      size_t size = oop(q)->adjust_pointers();
+      size_t size = MarkSweep::adjust_pointers(oop(q));
       size = space->adjust_obj_size(size);
 
       q += size;
@@ -238,7 +238,7 @@
     if (oop(q)->is_gc_marked()) {
       // q is alive
       // point all the oops to the new location
-      size_t size = oop(q)->adjust_pointers();
+      size_t size = MarkSweep::adjust_pointers(oop(q));
       size = space->adjust_obj_size(size);
       debug_only(prev_q = q);
       q += size;
--- a/hotspot/src/share/vm/oops/instanceClassLoaderKlass.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceClassLoaderKlass.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. 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
@@ -42,7 +42,6 @@
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #endif // INCLUDE_ALL_GCS
 
 // Macro to define InstanceClassLoaderKlass::oop_oop_iterate for virtual/nonvirtual for
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -74,7 +74,6 @@
 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #endif // INCLUDE_ALL_GCS
 #ifdef COMPILER1
 #include "c1/c1_Compiler.hpp"
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. 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
@@ -47,7 +47,6 @@
 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #endif // INCLUDE_ALL_GCS
 
 int InstanceMirrorKlass::_offset_of_static_fields = 0;
--- a/hotspot/src/share/vm/oops/instanceRefKlass.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. 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
@@ -43,7 +43,6 @@
 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #endif // INCLUDE_ALL_GCS
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp	Wed Mar 25 19:50:00 2015 +0100
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp	Thu Mar 26 11:00:49 2015 +0000
@@ -55,7 +55,6 @@
 #include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
-#include "oops/oop.pcgc.inline.hpp"
 #endif // INCLUDE_ALL_GCS
 
 ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {