< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 49518 : imported patch 8200385-prev-bitmap-marks-left
rev 49525 : [mq]: 8200426-sangheon-review
@@ -3639,13 +3639,11 @@
// An always "is_alive" closure that is used to preserve referents.
// If the object is non-null then it's alive. Used in the preservation
// of referent objects that are pointed to by reference objects
// discovered by the CM ref processor.
class G1AlwaysAliveClosure: public BoolObjectClosure {
- G1CollectedHeap* _g1;
public:
- G1AlwaysAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
bool do_object_b(oop p) {
if (p != NULL) {
return true;
}
return false;
@@ -3653,35 +3651,35 @@
};
bool G1STWIsAliveClosure::do_object_b(oop p) {
// An object is reachable if it is outside the collection set,
// or is inside and copied.
- return !_g1->is_in_cset(p) || p->is_forwarded();
+ return !_g1h->is_in_cset(p) || p->is_forwarded();
}
// Non Copying Keep Alive closure
class G1KeepAliveClosure: public OopClosure {
- G1CollectedHeap* _g1;
+ G1CollectedHeap*_g1h;
public:
- G1KeepAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
+ G1KeepAliveClosure(G1CollectedHeap* g1h) :_g1h(g1h) {}
void do_oop(narrowOop* p) { guarantee(false, "Not needed"); }
void do_oop(oop* p) {
oop obj = *p;
assert(obj != NULL, "the caller should have filtered out NULL values");
- const InCSetState cset_state = _g1->in_cset_state(obj);
+ const InCSetState cset_state =_g1h->in_cset_state(obj);
if (!cset_state.is_in_cset_or_humongous()) {
return;
}
if (cset_state.is_in_cset()) {
assert( obj->is_forwarded(), "invariant" );
*p = obj->forwardee();
} else {
assert(!obj->is_forwarded(), "invariant" );
assert(cset_state.is_humongous(),
"Only allowed InCSet state is IsHumongous, but is %d", cset_state.value());
- _g1->set_humongous_is_live(obj);
+ _g1h->set_humongous_is_live(obj);
}
}
};
// Copying Keep Alive closure - can be called from both
@@ -3921,11 +3919,11 @@
G1ParScanThreadState* pss = _pss->state_for_worker(worker_id);
pss->set_ref_processor(NULL);
assert(pss->queue_is_empty(), "both queue and overflow should be empty");
// Is alive closure
- G1AlwaysAliveClosure always_alive(_g1h);
+ G1AlwaysAliveClosure always_alive;
// Copying keep alive closure. Applied to referent objects that need
// to be copied.
G1CopyingKeepAliveClosure keep_alive(_g1h, pss->closures()->raw_strong_oops(), pss);
< prev index next >