< prev index next >

src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp

Print this page
rev 7471 : 8060025: Object copy time regressions after JDK-8031323 and JDK-8057536
Summary: Evaluate and improve object copy time by micro-optimizations and splitting out slow and fast paths aggressively.
Reviewed-by:
Contributed-by: Tony Printezis <tprintezis@twitter.com>, Thomas Schatzl <thomas.schatzl@oracle.com>

*** 36,60 **** // Although we never intentionally push references outside of the collection // set, due to (benign) races in the claim mechanism during RSet scanning more // than one thread might claim the same card. So the same card may be // processed multiple times. So redo this check. ! G1CollectedHeap::in_cset_state_t in_cset_state = _g1h->in_cset_state(obj); ! if (in_cset_state == G1CollectedHeap::InCSet) { oop forwardee; markOop m = obj->mark(); if (m->is_marked()) { forwardee = (oop) m->decode_pointer(); } else { ! forwardee = copy_to_survivor_space(obj, m); } oopDesc::encode_store_heap_oop(p, forwardee); ! } else if (in_cset_state == G1CollectedHeap::IsHumongous) { _g1h->set_humongous_is_live(obj); } else { ! assert(in_cset_state == G1CollectedHeap::InNeither, ! err_msg("In_cset_state must be InNeither here, but is %d", in_cset_state)); } assert(obj != NULL, "Must be"); update_rs(from, p, queue_num()); } --- 36,60 ---- // Although we never intentionally push references outside of the collection // set, due to (benign) races in the claim mechanism during RSet scanning more // than one thread might claim the same card. So the same card may be // processed multiple times. So redo this check. ! const in_cset_state_t in_cset_state = _g1h->in_cset_state(obj); ! if (InCSetState::is_in_cset(in_cset_state)) { oop forwardee; markOop m = obj->mark(); if (m->is_marked()) { forwardee = (oop) m->decode_pointer(); } else { ! forwardee = copy_to_survivor_space(in_cset_state, obj, m); } oopDesc::encode_store_heap_oop(p, forwardee); ! } else if (InCSetState::is_humongous(in_cset_state)) { _g1h->set_humongous_is_live(obj); } else { ! assert(InCSetState::is_not_in_cset(in_cset_state), ! err_msg("In_cset_state must be NotInCSet here, but is %d", in_cset_state)); } assert(obj != NULL, "Must be"); update_rs(from, p, queue_num()); }
< prev index next >