hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
changeset 7658 b970e410547a
parent 7397 5b173b4ca846
child 8688 493d12ccc6db
equal deleted inserted replaced
7657:a80e571c3d96 7658:b970e410547a
  1056     || Universe::heap()->is_in_reserved(p);
  1056     || Universe::heap()->is_in_reserved(p);
  1057 }
  1057 }
  1058 #endif
  1058 #endif
  1059 
  1059 
  1060 void ParNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) {
  1060 void ParNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) {
  1061   if ((m != markOopDesc::prototype()) &&
  1061   if (m->must_be_preserved_for_promotion_failure(obj)) {
  1062       (!UseBiasedLocking || (m != markOopDesc::biased_locking_prototype()))) {
  1062     // We should really have separate per-worker stacks, rather
       
  1063     // than use locking of a common pair of stacks.
  1063     MutexLocker ml(ParGCRareEvent_lock);
  1064     MutexLocker ml(ParGCRareEvent_lock);
  1064     DefNewGeneration::preserve_mark_if_necessary(obj, m);
  1065     preserve_mark(obj, m);
  1065   }
  1066   }
  1066 }
  1067 }
  1067 
  1068 
  1068 // Multiple GC threads may try to promote an object.  If the object
  1069 // Multiple GC threads may try to promote an object.  If the object
  1069 // is successfully promoted, a forwarding pointer will be installed in
  1070 // is successfully promoted, a forwarding pointer will be installed in