421 if (has_displaced_mark_raw()) {
422 set_displaced_mark_raw(displaced_mark_raw()->incr_age());
423 } else {
424 set_mark_raw(mark_raw()->incr_age());
425 }
426 }
427
428 #if INCLUDE_PARALLELGC
429 void oopDesc::pc_follow_contents(ParCompactionManager* cm) {
430 klass()->oop_pc_follow_contents(this, cm);
431 }
432
433 void oopDesc::pc_update_contents(ParCompactionManager* cm) {
434 Klass* k = klass();
435 if (!k->is_typeArray_klass()) {
436 // It might contain oops beyond the header, so take the virtual call.
437 k->oop_pc_update_pointers(this, cm);
438 }
439 // Else skip it. The TypeArrayKlass in the header never needs scavenging.
440 }
441
442 void oopDesc::ps_push_contents(PSPromotionManager* pm) {
443 Klass* k = klass();
444 if (!k->is_typeArray_klass()) {
445 // It might contain oops beyond the header, so take the virtual call.
446 k->oop_ps_push_contents(this, pm);
447 }
448 // Else skip it. The TypeArrayKlass in the header never needs scavenging.
449 }
450 #endif // INCLUDE_PARALLELGC
451
452 template <typename OopClosureType>
453 void oopDesc::oop_iterate(OopClosureType* cl) {
454 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, klass());
455 }
456
457 template <typename OopClosureType>
458 void oopDesc::oop_iterate(OopClosureType* cl, MemRegion mr) {
459 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, klass(), mr);
460 }
461
462 template <typename OopClosureType>
463 int oopDesc::oop_iterate_size(OopClosureType* cl) {
464 Klass* k = klass();
465 int size = size_given_klass(k);
466 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, k);
467 return size;
468 }
|
421 if (has_displaced_mark_raw()) {
422 set_displaced_mark_raw(displaced_mark_raw()->incr_age());
423 } else {
424 set_mark_raw(mark_raw()->incr_age());
425 }
426 }
427
428 #if INCLUDE_PARALLELGC
429 void oopDesc::pc_follow_contents(ParCompactionManager* cm) {
430 klass()->oop_pc_follow_contents(this, cm);
431 }
432
433 void oopDesc::pc_update_contents(ParCompactionManager* cm) {
434 Klass* k = klass();
435 if (!k->is_typeArray_klass()) {
436 // It might contain oops beyond the header, so take the virtual call.
437 k->oop_pc_update_pointers(this, cm);
438 }
439 // Else skip it. The TypeArrayKlass in the header never needs scavenging.
440 }
441 #endif // INCLUDE_PARALLELGC
442
443 template <typename OopClosureType>
444 void oopDesc::oop_iterate(OopClosureType* cl) {
445 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, klass());
446 }
447
448 template <typename OopClosureType>
449 void oopDesc::oop_iterate(OopClosureType* cl, MemRegion mr) {
450 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, klass(), mr);
451 }
452
453 template <typename OopClosureType>
454 int oopDesc::oop_iterate_size(OopClosureType* cl) {
455 Klass* k = klass();
456 int size = size_given_klass(k);
457 OopIteratorClosureDispatch::oop_oop_iterate(cl, this, k);
458 return size;
459 }
|