< prev index next >

src/share/vm/oops/oop.inline.hpp

Print this page
rev 12851 : 8138737: Remove oop_ms_adjust_pointers and use oop_iterate instead
Reviewed-by:


 647 
 648 // The following method needs to be MT safe.
 649 uint oopDesc::age() const {
 650   assert(!is_forwarded(), "Attempt to read age from forwarded mark");
 651   if (has_displaced_mark()) {
 652     return displaced_mark()->age();
 653   } else {
 654     return mark()->age();
 655   }
 656 }
 657 
 658 void oopDesc::incr_age() {
 659   assert(!is_forwarded(), "Attempt to increment age of forwarded mark");
 660   if (has_displaced_mark()) {
 661     set_displaced_mark(displaced_mark()->incr_age());
 662   } else {
 663     set_mark(mark()->incr_age());
 664   }
 665 }
 666 
 667 int oopDesc::ms_adjust_pointers() {
 668   debug_only(int check_size = size());
 669   int s = klass()->oop_ms_adjust_pointers(this);
 670   assert(s == check_size, "should be the same");
 671   return s;
 672 }
 673 
 674 #if INCLUDE_ALL_GCS
 675 void oopDesc::pc_follow_contents(ParCompactionManager* cm) {
 676   klass()->oop_pc_follow_contents(this, cm);
 677 }
 678 
 679 void oopDesc::pc_update_contents(ParCompactionManager* cm) {
 680   Klass* k = klass();
 681   if (!k->is_typeArray_klass()) {
 682     // It might contain oops beyond the header, so take the virtual call.
 683     k->oop_pc_update_pointers(this, cm);
 684   }
 685   // Else skip it.  The TypeArrayKlass in the header never needs scavenging.
 686 }
 687 
 688 void oopDesc::ps_push_contents(PSPromotionManager* pm) {
 689   Klass* k = klass();
 690   if (!k->is_typeArray_klass()) {
 691     // It might contain oops beyond the header, so take the virtual call.
 692     k->oop_ps_push_contents(this, pm);
 693   }




 647 
 648 // The following method needs to be MT safe.
 649 uint oopDesc::age() const {
 650   assert(!is_forwarded(), "Attempt to read age from forwarded mark");
 651   if (has_displaced_mark()) {
 652     return displaced_mark()->age();
 653   } else {
 654     return mark()->age();
 655   }
 656 }
 657 
 658 void oopDesc::incr_age() {
 659   assert(!is_forwarded(), "Attempt to increment age of forwarded mark");
 660   if (has_displaced_mark()) {
 661     set_displaced_mark(displaced_mark()->incr_age());
 662   } else {
 663     set_mark(mark()->incr_age());
 664   }
 665 }
 666 







 667 #if INCLUDE_ALL_GCS
 668 void oopDesc::pc_follow_contents(ParCompactionManager* cm) {
 669   klass()->oop_pc_follow_contents(this, cm);
 670 }
 671 
 672 void oopDesc::pc_update_contents(ParCompactionManager* cm) {
 673   Klass* k = klass();
 674   if (!k->is_typeArray_klass()) {
 675     // It might contain oops beyond the header, so take the virtual call.
 676     k->oop_pc_update_pointers(this, cm);
 677   }
 678   // Else skip it.  The TypeArrayKlass in the header never needs scavenging.
 679 }
 680 
 681 void oopDesc::ps_push_contents(PSPromotionManager* pm) {
 682   Klass* k = klass();
 683   if (!k->is_typeArray_klass()) {
 684     // It might contain oops beyond the header, so take the virtual call.
 685     k->oop_ps_push_contents(this, pm);
 686   }


< prev index next >