< prev index next >

src/share/vm/gc/parallel/psCompactionManager.cpp

Print this page




 278 }
 279 
 280 void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 281   cm->follow_klass(this);
 282 
 283   if (UseCompressedOops) {
 284     oop_pc_follow_contents_specialized<narrowOop>(objArrayOop(obj), 0, cm);
 285   } else {
 286     oop_pc_follow_contents_specialized<oop>(objArrayOop(obj), 0, cm);
 287   }
 288 }
 289 
 290 void TypeArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 291   assert(obj->is_typeArray(),"must be a type array");
 292   // Performance tweak: We skip iterating over the klass pointer since we
 293   // know that Universe::TypeArrayKlass never moves.
 294 }
 295 
 296 void ValueArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 297   assert(obj->is_valueArray(),"must be a value array");
 298 
 299   cm->follow_klass(this);
 300   if (contains_oops()) {
 301     Unimplemented(); // Don't have embedded oops to test with just now

 302   }
 303 }
 304 
 305 void ParCompactionManager::follow_marking_stacks() {
 306   do {
 307     // Drain the overflow stack first, to allow stealing from the marking stack.
 308     oop obj;
 309     while (marking_stack()->pop_overflow(obj)) {
 310       follow_contents(obj);
 311     }
 312     while (marking_stack()->pop_local(obj)) {
 313       follow_contents(obj);
 314     }
 315 
 316     // Process ObjArrays one at a time to avoid marking stack bloat.
 317     ObjArrayTask task;
 318     if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) {
 319       follow_contents((objArrayOop)task.obj(), task.index());
 320     }
 321   } while (!marking_stacks_empty());


 278 }
 279 
 280 void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 281   cm->follow_klass(this);
 282 
 283   if (UseCompressedOops) {
 284     oop_pc_follow_contents_specialized<narrowOop>(objArrayOop(obj), 0, cm);
 285   } else {
 286     oop_pc_follow_contents_specialized<oop>(objArrayOop(obj), 0, cm);
 287   }
 288 }
 289 
 290 void TypeArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 291   assert(obj->is_typeArray(),"must be a type array");
 292   // Performance tweak: We skip iterating over the klass pointer since we
 293   // know that Universe::TypeArrayKlass never moves.
 294 }
 295 
 296 void ValueArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 297   assert(obj->is_valueArray(),"must be a value array");

 298   cm->follow_klass(this);
 299   if (contains_oops()) { // CMH: parallel version (like objArrayTask) missing, treat as single obj for now
 300     ParCompactionManager::MarkAndPushClosure cl(cm);
 301     ValueArrayKlass::oop_oop_iterate_elements<true>(valueArrayOop(obj), &cl);
 302   }
 303 }
 304 
 305 void ParCompactionManager::follow_marking_stacks() {
 306   do {
 307     // Drain the overflow stack first, to allow stealing from the marking stack.
 308     oop obj;
 309     while (marking_stack()->pop_overflow(obj)) {
 310       follow_contents(obj);
 311     }
 312     while (marking_stack()->pop_local(obj)) {
 313       follow_contents(obj);
 314     }
 315 
 316     // Process ObjArrays one at a time to avoid marking stack bloat.
 317     ObjArrayTask task;
 318     if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) {
 319       follow_contents((objArrayOop)task.obj(), task.index());
 320     }
 321   } while (!marking_stacks_empty());
< prev index next >