367 } else { 368 // treat referent as normal oop 369 pm->claim_or_forward_depth(referent_addr); 370 } 371 } 372 // Treat discovered as normal oop, if ref is not "active", 373 // i.e. if next is non-NULL. 374 T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj); 375 T next_oop = oopDesc::load_heap_oop(next_addr); 376 if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active" 377 T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj); 378 log_develop_trace(gc, ref)(" Process discovered as normal " PTR_FORMAT, p2i(discovered_addr)); 379 if (PSScavenge::should_scavenge(discovered_addr)) { 380 pm->claim_or_forward_depth(discovered_addr); 381 } 382 } 383 // Treat next as normal oop; next is a link in the reference queue. 384 if (PSScavenge::should_scavenge(next_addr)) { 385 pm->claim_or_forward_depth(next_addr); 386 } 387 klass->InstanceKlass::oop_ps_push_contents(obj, pm); 388 } 389 390 void InstanceRefKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 391 if (UseCompressedOops) { 392 oop_ps_push_contents_specialized<narrowOop>(obj, this, pm); 393 } else { 394 oop_ps_push_contents_specialized<oop>(obj, this, pm); 395 } 396 } 397 398 void ObjArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 399 assert(obj->is_objArray(), "obj must be obj array"); 400 PushContentsClosure cl(pm); 401 oop_oop_iterate_elements<true>(objArrayOop(obj), &cl); 402 } 403 404 void TypeArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 405 assert(obj->is_typeArray(),"must be a type array"); 406 ShouldNotReachHere(); | 367 } else { 368 // treat referent as normal oop 369 pm->claim_or_forward_depth(referent_addr); 370 } 371 } 372 // Treat discovered as normal oop, if ref is not "active", 373 // i.e. if next is non-NULL. 374 T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj); 375 T next_oop = oopDesc::load_heap_oop(next_addr); 376 if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active" 377 T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj); 378 log_develop_trace(gc, ref)(" Process discovered as normal " PTR_FORMAT, p2i(discovered_addr)); 379 if (PSScavenge::should_scavenge(discovered_addr)) { 380 pm->claim_or_forward_depth(discovered_addr); 381 } 382 } 383 // Treat next as normal oop; next is a link in the reference queue. 384 if (PSScavenge::should_scavenge(next_addr)) { 385 pm->claim_or_forward_depth(next_addr); 386 } 387 // Treat value as normal oop if Epehemeron 388 if (klass->reference_type() == REF_EPHEMERON) { 389 T* value_addr = (T*)java_lang_ref_Ephemeron::value_addr(obj); 390 if (PSScavenge::should_scavenge(value_addr)) { 391 pm->claim_or_forward_depth(value_addr); 392 } 393 } 394 klass->InstanceKlass::oop_ps_push_contents(obj, pm); 395 } 396 397 void InstanceRefKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 398 if (UseCompressedOops) { 399 oop_ps_push_contents_specialized<narrowOop>(obj, this, pm); 400 } else { 401 oop_ps_push_contents_specialized<oop>(obj, this, pm); 402 } 403 } 404 405 void ObjArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 406 assert(obj->is_objArray(), "obj must be obj array"); 407 PushContentsClosure cl(pm); 408 oop_oop_iterate_elements<true>(objArrayOop(obj), &cl); 409 } 410 411 void TypeArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { 412 assert(obj->is_typeArray(),"must be a type array"); 413 ShouldNotReachHere(); |