Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1OopClosures.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 | eec72fa4b108 |
children | dd9cc155639c |
comparison
equal
deleted
inserted
replaced
22900:dfa21a177d66 | 22901:c132be0fb74d |
---|---|
65 inline void G1ParScanClosure::do_oop_nv(T* p) { | 65 inline void G1ParScanClosure::do_oop_nv(T* p) { |
66 T heap_oop = oopDesc::load_heap_oop(p); | 66 T heap_oop = oopDesc::load_heap_oop(p); |
67 | 67 |
68 if (!oopDesc::is_null(heap_oop)) { | 68 if (!oopDesc::is_null(heap_oop)) { |
69 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); | 69 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); |
70 G1CollectedHeap::in_cset_state_t state = _g1->in_cset_state(obj); | 70 const InCSetState state = _g1->in_cset_state(obj); |
71 if (state == G1CollectedHeap::InCSet) { | 71 if (state.is_in_cset()) { |
72 // We're not going to even bother checking whether the object is | 72 // We're not going to even bother checking whether the object is |
73 // already forwarded or not, as this usually causes an immediate | 73 // already forwarded or not, as this usually causes an immediate |
74 // stall. We'll try to prefetch the object (for write, given that | 74 // stall. We'll try to prefetch the object (for write, given that |
75 // we might need to install the forwarding reference) and we'll | 75 // we might need to install the forwarding reference) and we'll |
76 // get back to it when pop it from the queue | 76 // get back to it when pop it from the queue |
85 obj->forwardee() == oopDesc::load_decode_heap_oop(p)), | 85 obj->forwardee() == oopDesc::load_decode_heap_oop(p)), |
86 "p should still be pointing to obj or to its forwardee"); | 86 "p should still be pointing to obj or to its forwardee"); |
87 | 87 |
88 _par_scan_state->push_on_queue(p); | 88 _par_scan_state->push_on_queue(p); |
89 } else { | 89 } else { |
90 if (state == G1CollectedHeap::IsHumongous) { | 90 if (state.is_humongous()) { |
91 _g1->set_humongous_is_live(obj); | 91 _g1->set_humongous_is_live(obj); |
92 } | 92 } |
93 _par_scan_state->update_rs(_from, p, _worker_id); | 93 _par_scan_state->update_rs(_from, p, _worker_id); |
94 } | 94 } |
95 } | 95 } |