< prev index next >

src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp

Print this page

        

*** 24,36 **** #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP #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) { ObjArrayTask task(obj, index); assert(task.is_valid(), "bad ObjArrayTask"); --- 24,38 ---- #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP #include "gc_implementation/parallelScavenge/psCompactionManager.hpp" ! #include "gc_implementation/parallelScavenge/psParallelCompact.inline.hpp" ! #include "oops/objArrayOop.hpp" ! #include "oops/oop.inline.hpp" ! #include "utilities/debug.hpp" ! #include "utilities/globalDefinitions.hpp" void ParCompactionManager::push_objarray(oop obj, size_t index) { ObjArrayTask task(obj, index); assert(task.is_valid(), "bad ObjArrayTask");
*** 47,64 **** #endif 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 --- 49,93 ---- #endif region_stack()->push(index); } inline void ParCompactionManager::follow_contents(oop obj) { ! assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked"); ! obj->pc_follow_contents(this); ! } ! ! template <class T> ! inline void oop_pc_follow_contents_specialized(ObjArrayKlass* klass, oop obj, int index, ParCompactionManager* cm) { ! objArrayOop a = objArrayOop(obj); ! const size_t len = size_t(a->length()); ! const size_t beg_index = size_t(index); ! assert(beg_index < len || len == 0, "index too large"); ! ! const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); ! const size_t end_index = beg_index + stride; ! T* const base = (T*)a->base(); ! T* const beg = base + beg_index; ! T* const end = base + end_index; ! ! // Push the non-NULL elements of the next stride on the marking stack. ! for (T* e = beg; e < end; e++) { ! PSParallelCompact::mark_and_push<T>(cm, e); ! } ! ! if (end_index < len) { ! cm->push_objarray(a, end_index); // Push the continuation. ! } } inline void ParCompactionManager::follow_contents(objArrayOop obj, int index) { ! if (UseCompressedOops) { ! oop_pc_follow_contents_specialized<narrowOop>((ObjArrayKlass*)obj->klass(), obj, index, this); ! } else { ! oop_pc_follow_contents_specialized<oop>((ObjArrayKlass*)obj->klass(), obj, index, this); ! } } inline void ParCompactionManager::update_contents(oop obj) { ! obj->pc_update_contents(); } #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP
< prev index next >