src/share/vm/gc_implementation/parNew/parNewGeneration.cpp

changeset 2380
74ee0db180fa
parent 2314
f95d63e2154a
child 2651
92da084fefc9
equal deleted inserted replaced
2379:b03260081e9b 2380:74ee0db180fa
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

mercurial