mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8067655: Clean up G1 remembered set oop iteration
Pass on the static type G1ParPushHeapRSClosure to allow oop_iterate devirtualization Reviewed-by: jmasa, kbarrett
This commit is contained in:
parent
12273757f7
commit
cc786b287d
7 changed files with 48 additions and 94 deletions
|
@ -80,7 +80,7 @@ G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs)
|
|||
_prev_period_summary()
|
||||
{
|
||||
_seq_task = new SubTasksDone(NumSeqTasks);
|
||||
_cset_rs_update_cl = NEW_C_HEAP_ARRAY(OopsInHeapRegionClosure*, n_workers(), mtGC);
|
||||
_cset_rs_update_cl = NEW_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, n_workers(), mtGC);
|
||||
for (uint i = 0; i < n_workers(); i++) {
|
||||
_cset_rs_update_cl[i] = NULL;
|
||||
}
|
||||
|
@ -94,14 +94,14 @@ G1RemSet::~G1RemSet() {
|
|||
for (uint i = 0; i < n_workers(); i++) {
|
||||
assert(_cset_rs_update_cl[i] == NULL, "it should be");
|
||||
}
|
||||
FREE_C_HEAP_ARRAY(OopsInHeapRegionClosure*, _cset_rs_update_cl);
|
||||
FREE_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, _cset_rs_update_cl);
|
||||
}
|
||||
|
||||
class ScanRSClosure : public HeapRegionClosure {
|
||||
size_t _cards_done, _cards;
|
||||
G1CollectedHeap* _g1h;
|
||||
|
||||
OopsInHeapRegionClosure* _oc;
|
||||
G1ParPushHeapRSClosure* _oc;
|
||||
CodeBlobClosure* _code_root_cl;
|
||||
|
||||
G1BlockOffsetSharedArray* _bot_shared;
|
||||
|
@ -113,7 +113,7 @@ class ScanRSClosure : public HeapRegionClosure {
|
|||
bool _try_claimed;
|
||||
|
||||
public:
|
||||
ScanRSClosure(OopsInHeapRegionClosure* oc,
|
||||
ScanRSClosure(G1ParPushHeapRSClosure* oc,
|
||||
CodeBlobClosure* code_root_cl,
|
||||
uint worker_i) :
|
||||
_oc(oc),
|
||||
|
@ -135,8 +135,7 @@ public:
|
|||
void scanCard(size_t index, HeapRegion *r) {
|
||||
// Stack allocate the DirtyCardToOopClosure instance
|
||||
HeapRegionDCTOC cl(_g1h, r, _oc,
|
||||
CardTableModRefBS::Precise,
|
||||
HeapRegionDCTOC::IntoCSFilterKind);
|
||||
CardTableModRefBS::Precise);
|
||||
|
||||
// Set the "from" region in the closure.
|
||||
_oc->set_region(r);
|
||||
|
@ -231,7 +230,7 @@ public:
|
|||
size_t cards_looked_up() { return _cards;}
|
||||
};
|
||||
|
||||
void G1RemSet::scanRS(OopsInHeapRegionClosure* oc,
|
||||
void G1RemSet::scanRS(G1ParPushHeapRSClosure* oc,
|
||||
CodeBlobClosure* code_root_cl,
|
||||
uint worker_i) {
|
||||
double rs_time_start = os::elapsedTime();
|
||||
|
@ -301,7 +300,7 @@ void G1RemSet::cleanupHRRS() {
|
|||
HeapRegionRemSet::cleanup();
|
||||
}
|
||||
|
||||
void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
|
||||
void G1RemSet::oops_into_collection_set_do(G1ParPushHeapRSClosure* oc,
|
||||
CodeBlobClosure* code_root_cl,
|
||||
uint worker_i) {
|
||||
#if CARD_REPEAT_HISTO
|
||||
|
@ -417,7 +416,7 @@ G1Mux2Closure::G1Mux2Closure(OopClosure *c1, OopClosure *c2) :
|
|||
G1UpdateRSOrPushRefOopClosure::
|
||||
G1UpdateRSOrPushRefOopClosure(G1CollectedHeap* g1h,
|
||||
G1RemSet* rs,
|
||||
OopsInHeapRegionClosure* push_ref_cl,
|
||||
G1ParPushHeapRSClosure* push_ref_cl,
|
||||
bool record_refs_into_cset,
|
||||
uint worker_i) :
|
||||
_g1(g1h), _g1_rem_set(rs), _from(NULL),
|
||||
|
@ -518,7 +517,7 @@ bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
|
|||
ct_freq_note_card(_ct_bs->index_for(start));
|
||||
#endif
|
||||
|
||||
OopsInHeapRegionClosure* oops_in_heap_closure = NULL;
|
||||
G1ParPushHeapRSClosure* oops_in_heap_closure = NULL;
|
||||
if (check_for_refs_into_cset) {
|
||||
// ConcurrentG1RefineThreads have worker numbers larger than what
|
||||
// _cset_rs_update_cl[] is set up to handle. But those threads should
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue