< prev index next >

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

Print this page




 237         PSParallelCompact::ref_processor()->discover_reference(obj, klass->reference_type())) {
 238       // reference already enqueued, referent will be traversed later
 239       klass->InstanceKlass::oop_pc_follow_contents(obj, cm);
 240       log_develop_trace(gc, ref)("       Non NULL enqueued " PTR_FORMAT, p2i(obj));
 241       return;
 242     } else {
 243       // treat referent as normal oop
 244       log_develop_trace(gc, ref)("       Non NULL normal " PTR_FORMAT, p2i(obj));
 245       cm->mark_and_push(referent_addr);
 246     }
 247   }
 248   T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj);
 249   // Treat discovered as normal oop, if ref is not "active",
 250   // i.e. if next is non-NULL.
 251   T  next_oop = oopDesc::load_heap_oop(next_addr);
 252   if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active"
 253     T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj);
 254     log_develop_trace(gc, ref)("   Process discovered as normal " PTR_FORMAT, p2i(discovered_addr));
 255     cm->mark_and_push(discovered_addr);
 256   }

 257   cm->mark_and_push(next_addr);





 258   klass->InstanceKlass::oop_pc_follow_contents(obj, cm);
 259 }
 260 
 261 
 262 void InstanceRefKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 263   if (UseCompressedOops) {
 264     oop_pc_follow_contents_specialized<narrowOop>(this, obj, cm);
 265   } else {
 266     oop_pc_follow_contents_specialized<oop>(this, obj, cm);
 267   }
 268 }
 269 
 270 void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 271   cm->follow_klass(this);
 272 
 273   if (UseCompressedOops) {
 274     oop_pc_follow_contents_specialized<narrowOop>(objArrayOop(obj), 0, cm);
 275   } else {
 276     oop_pc_follow_contents_specialized<oop>(objArrayOop(obj), 0, cm);
 277   }




 237         PSParallelCompact::ref_processor()->discover_reference(obj, klass->reference_type())) {
 238       // reference already enqueued, referent will be traversed later
 239       klass->InstanceKlass::oop_pc_follow_contents(obj, cm);
 240       log_develop_trace(gc, ref)("       Non NULL enqueued " PTR_FORMAT, p2i(obj));
 241       return;
 242     } else {
 243       // treat referent as normal oop
 244       log_develop_trace(gc, ref)("       Non NULL normal " PTR_FORMAT, p2i(obj));
 245       cm->mark_and_push(referent_addr);
 246     }
 247   }
 248   T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj);
 249   // Treat discovered as normal oop, if ref is not "active",
 250   // i.e. if next is non-NULL.
 251   T  next_oop = oopDesc::load_heap_oop(next_addr);
 252   if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active"
 253     T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj);
 254     log_develop_trace(gc, ref)("   Process discovered as normal " PTR_FORMAT, p2i(discovered_addr));
 255     cm->mark_and_push(discovered_addr);
 256   }
 257   // Treat next as normal oop
 258   cm->mark_and_push(next_addr);
 259   // Treat value as normal oop if Epehemeron
 260   if (klass->reference_type() == REF_EPHEMERON) {
 261     T* value_addr = (T*)java_lang_ref_Ephemeron::value_addr(obj);
 262     cm->mark_and_push(value_addr);
 263   }
 264   klass->InstanceKlass::oop_pc_follow_contents(obj, cm);
 265 }
 266 
 267 
 268 void InstanceRefKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 269   if (UseCompressedOops) {
 270     oop_pc_follow_contents_specialized<narrowOop>(this, obj, cm);
 271   } else {
 272     oop_pc_follow_contents_specialized<oop>(this, obj, cm);
 273   }
 274 }
 275 
 276 void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) {
 277   cm->follow_klass(this);
 278 
 279   if (UseCompressedOops) {
 280     oop_pc_follow_contents_specialized<narrowOop>(objArrayOop(obj), 0, cm);
 281   } else {
 282     oop_pc_follow_contents_specialized<oop>(objArrayOop(obj), 0, cm);
 283   }


< prev index next >