459 if (UseCompressedOops) { 460 objarray_follow_contents<narrowOop>(obj, 0); 461 } else { 462 objarray_follow_contents<oop>(obj, 0); 463 } 464 } 465 466 #if INCLUDE_ALL_GCS 467 void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, 468 oop obj) { 469 assert(obj->is_array(), "obj must be array"); 470 PSParallelCompact::follow_klass(cm, obj->klass()); 471 if (UseCompressedOops) { 472 objarray_follow_contents<narrowOop>(cm, obj, 0); 473 } else { 474 objarray_follow_contents<oop>(cm, obj, 0); 475 } 476 } 477 #endif // INCLUDE_ALL_GCS 478 479 #define if_do_metadata_checked(closure, nv_suffix) \ 480 /* Make sure the non-virtual and the virtual versions match. */ \ 481 assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \ 482 "Inconsistency in do_metadata"); \ 483 if (closure->do_metadata##nv_suffix()) 484 485 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \ 486 \ 487 int ObjArrayKlass::oop_oop_iterate##nv_suffix(oop obj, \ 488 OopClosureType* closure) { \ 489 SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::oa); \ 490 assert (obj->is_array(), "obj must be array"); \ 491 objArrayOop a = objArrayOop(obj); \ 492 /* Get size before changing pointers. */ \ 493 /* Don't call size() or oop_size() since that is a virtual call. */ \ 494 int size = a->object_size(); \ 495 if_do_metadata_checked(closure, nv_suffix) { \ 496 closure->do_klass##nv_suffix(obj->klass()); \ 497 } \ 498 ObjArrayKlass_OOP_ITERATE(a, p, (closure)->do_oop##nv_suffix(p)) \ 499 return size; \ 500 } 501 502 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \ 503 \ 504 int ObjArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj, \ | 459 if (UseCompressedOops) { 460 objarray_follow_contents<narrowOop>(obj, 0); 461 } else { 462 objarray_follow_contents<oop>(obj, 0); 463 } 464 } 465 466 #if INCLUDE_ALL_GCS 467 void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, 468 oop obj) { 469 assert(obj->is_array(), "obj must be array"); 470 PSParallelCompact::follow_klass(cm, obj->klass()); 471 if (UseCompressedOops) { 472 objarray_follow_contents<narrowOop>(cm, obj, 0); 473 } else { 474 objarray_follow_contents<oop>(cm, obj, 0); 475 } 476 } 477 #endif // INCLUDE_ALL_GCS 478 479 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \ 480 \ 481 int ObjArrayKlass::oop_oop_iterate##nv_suffix(oop obj, \ 482 OopClosureType* closure) { \ 483 SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::oa); \ 484 assert (obj->is_array(), "obj must be array"); \ 485 objArrayOop a = objArrayOop(obj); \ 486 /* Get size before changing pointers. */ \ 487 /* Don't call size() or oop_size() since that is a virtual call. */ \ 488 int size = a->object_size(); \ 489 if_do_metadata_checked(closure, nv_suffix) { \ 490 closure->do_klass##nv_suffix(obj->klass()); \ 491 } \ 492 ObjArrayKlass_OOP_ITERATE(a, p, (closure)->do_oop##nv_suffix(p)) \ 493 return size; \ 494 } 495 496 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \ 497 \ 498 int ObjArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj, \ |