< prev index next >

src/hotspot/share/gc/cms/parOopClosures.inline.hpp

Print this page

        

*** 42,54 **** // that to-space doesn't already contain this object if ((HeapWord*)obj < _boundary && !_g->to()->is_in_reserved(obj)) { // we need to ensure that it is copied (see comment in // ParScanClosure::do_oop_work). Klass* objK = obj->klass(); ! markWord m = obj->mark_raw(); oop new_obj; ! if (m.is_marked()) { // Contains forwarding pointer. new_obj = ParNewGeneration::real_forwardee(obj); } else { size_t obj_sz = obj->size_given_klass(objK); new_obj = ((ParNewGeneration*)_g)->copy_to_survivor_space(_par_scan_state, obj, obj_sz, m); --- 42,54 ---- // that to-space doesn't already contain this object if ((HeapWord*)obj < _boundary && !_g->to()->is_in_reserved(obj)) { // we need to ensure that it is copied (see comment in // ParScanClosure::do_oop_work). Klass* objK = obj->klass(); ! markOop m = obj->mark_raw(); oop new_obj; ! if (m->is_marked()) { // Contains forwarding pointer. new_obj = ParNewGeneration::real_forwardee(obj); } else { size_t obj_sz = obj->size_given_klass(objK); new_obj = ((ParNewGeneration*)_g)->copy_to_survivor_space(_par_scan_state, obj, obj_sz, m);
*** 106,118 **** // get the size of the object: if the mark we read is not a // forwarding pointer, then the klass is valid: the klass is only // overwritten with an overflow next pointer after the object is // forwarded. Klass* objK = obj->klass(); ! markWord m = obj->mark_raw(); oop new_obj; ! if (m.is_marked()) { // Contains forwarding pointer. new_obj = ParNewGeneration::real_forwardee(obj); RawAccess<IS_NOT_NULL>::oop_store(p, new_obj); log_develop_trace(gc, scavenge)("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", "forwarded ", new_obj->klass()->internal_name(), p2i(p), p2i((void *)obj), p2i((void *)new_obj), new_obj->size()); --- 106,118 ---- // get the size of the object: if the mark we read is not a // forwarding pointer, then the klass is valid: the klass is only // overwritten with an overflow next pointer after the object is // forwarded. Klass* objK = obj->klass(); ! markOop m = obj->mark_raw(); oop new_obj; ! if (m->is_marked()) { // Contains forwarding pointer. new_obj = ParNewGeneration::real_forwardee(obj); RawAccess<IS_NOT_NULL>::oop_store(p, new_obj); log_develop_trace(gc, scavenge)("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", "forwarded ", new_obj->klass()->internal_name(), p2i(p), p2i((void *)obj), p2i((void *)new_obj), new_obj->size());
< prev index next >