comparison src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp @ 22901:c132be0fb74d

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: kbarrett, mgerdin, jmasa Contributed-by: Tony Printezis <tprintezis@twitter.com>, Thomas Schatzl <thomas.schatzl@oracle.com>
author tschatzl
date Fri, 19 Dec 2014 09:21:06 +0100
parents f2e3f0e1f97d
children
comparison
equal deleted inserted replaced
22900:dfa21a177d66 22901:c132be0fb74d
36 36
37 // Although we never intentionally push references outside of the collection 37 // Although we never intentionally push references outside of the collection
38 // set, due to (benign) races in the claim mechanism during RSet scanning more 38 // set, due to (benign) races in the claim mechanism during RSet scanning more
39 // than one thread might claim the same card. So the same card may be 39 // than one thread might claim the same card. So the same card may be
40 // processed multiple times. So redo this check. 40 // processed multiple times. So redo this check.
41 G1CollectedHeap::in_cset_state_t in_cset_state = _g1h->in_cset_state(obj); 41 const InCSetState in_cset_state = _g1h->in_cset_state(obj);
42 if (in_cset_state == G1CollectedHeap::InCSet) { 42 if (in_cset_state.is_in_cset()) {
43 oop forwardee; 43 oop forwardee;
44 markOop m = obj->mark(); 44 markOop m = obj->mark();
45 if (m->is_marked()) { 45 if (m->is_marked()) {
46 forwardee = (oop) m->decode_pointer(); 46 forwardee = (oop) m->decode_pointer();
47 } else { 47 } else {
48 forwardee = copy_to_survivor_space(obj, m); 48 forwardee = copy_to_survivor_space(in_cset_state, obj, m);
49 } 49 }
50 oopDesc::encode_store_heap_oop(p, forwardee); 50 oopDesc::encode_store_heap_oop(p, forwardee);
51 } else if (in_cset_state == G1CollectedHeap::IsHumongous) { 51 } else if (in_cset_state.is_humongous()) {
52 _g1h->set_humongous_is_live(obj); 52 _g1h->set_humongous_is_live(obj);
53 } else { 53 } else {
54 assert(in_cset_state == G1CollectedHeap::InNeither, 54 assert(!in_cset_state.is_in_cset_or_humongous(),
55 err_msg("In_cset_state must be InNeither here, but is %d", in_cset_state)); 55 err_msg("In_cset_state must be NotInCSet here, but is " CSETSTATE_FORMAT, in_cset_state.value()));
56 } 56 }
57 57
58 assert(obj != NULL, "Must be"); 58 assert(obj != NULL, "Must be");
59 update_rs(from, p, queue_num()); 59 update_rs(from, p, queue_num());
60 } 60 }