mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-03 17:22:35 +00:00
8183124: Remove OopsInHeapRegionClosure
Reviewed-by: sjohanss, tschatzl
This commit is contained in:
parent
7225e6008d
commit
9eb98aac44
@ -60,7 +60,6 @@
|
||||
class HeapRegion;
|
||||
class HRRSCleanupTask;
|
||||
class GenerationSpec;
|
||||
class OopsInHeapRegionClosure;
|
||||
class G1ParScanThreadState;
|
||||
class G1ParScanThreadStateSet;
|
||||
class G1KlassScanClosure;
|
||||
|
||||
@ -35,15 +35,16 @@
|
||||
#include "gc/g1/heapRegionRemSet.hpp"
|
||||
#include "gc/shared/preservedMarks.inline.hpp"
|
||||
|
||||
class UpdateRSetDeferred : public OopsInHeapRegionClosure {
|
||||
class UpdateRSetDeferred : public ExtendedOopClosure {
|
||||
private:
|
||||
G1CollectedHeap* _g1;
|
||||
DirtyCardQueue *_dcq;
|
||||
G1SATBCardTableModRefBS* _ct_bs;
|
||||
HeapRegion* _from;
|
||||
|
||||
public:
|
||||
UpdateRSetDeferred(DirtyCardQueue* dcq) :
|
||||
_g1(G1CollectedHeap::heap()), _ct_bs(_g1->g1_barrier_set()), _dcq(dcq) {}
|
||||
_g1(G1CollectedHeap::heap()), _ct_bs(_g1->g1_barrier_set()), _dcq(dcq), _from(NULL) {}
|
||||
|
||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||
virtual void do_oop( oop* p) { do_oop_work(p); }
|
||||
@ -58,6 +59,8 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_region(HeapRegion* from) { _from = from; }
|
||||
};
|
||||
|
||||
class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
|
||||
@ -66,14 +69,14 @@ private:
|
||||
G1ConcurrentMark* _cm;
|
||||
HeapRegion* _hr;
|
||||
size_t _marked_bytes;
|
||||
OopsInHeapRegionClosure *_update_rset_cl;
|
||||
UpdateRSetDeferred* _update_rset_cl;
|
||||
bool _during_initial_mark;
|
||||
uint _worker_id;
|
||||
HeapWord* _last_forwarded_object_end;
|
||||
|
||||
public:
|
||||
RemoveSelfForwardPtrObjClosure(HeapRegion* hr,
|
||||
OopsInHeapRegionClosure* update_rset_cl,
|
||||
UpdateRSetDeferred* update_rset_cl,
|
||||
bool during_initial_mark,
|
||||
uint worker_id) :
|
||||
_g1(G1CollectedHeap::heap()),
|
||||
|
||||
@ -39,7 +39,7 @@ G1ParCopyHelper::G1ParCopyHelper(G1CollectedHeap* g1, G1ParScanThreadState* par
|
||||
{ }
|
||||
|
||||
G1ScanClosureBase::G1ScanClosureBase(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
|
||||
_g1(g1), _par_scan_state(par_scan_state)
|
||||
_g1(g1), _par_scan_state(par_scan_state), _from(NULL)
|
||||
{ }
|
||||
|
||||
void G1KlassScanClosure::do_klass(Klass* klass) {
|
||||
|
||||
@ -39,19 +39,11 @@ class G1ParScanThreadState;
|
||||
class G1CMTask;
|
||||
class ReferenceProcessor;
|
||||
|
||||
// A class that scans oops in a given heap region (much as OopsInGenClosure
|
||||
// scans oops in a generation.)
|
||||
class OopsInHeapRegionClosure: public ExtendedOopClosure {
|
||||
protected:
|
||||
HeapRegion* _from;
|
||||
public:
|
||||
void set_region(HeapRegion* from) { _from = from; }
|
||||
};
|
||||
|
||||
class G1ScanClosureBase : public OopsInHeapRegionClosure {
|
||||
class G1ScanClosureBase : public ExtendedOopClosure {
|
||||
protected:
|
||||
G1CollectedHeap* _g1;
|
||||
G1ParScanThreadState* _par_scan_state;
|
||||
HeapRegion* _from;
|
||||
|
||||
G1ScanClosureBase(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state);
|
||||
~G1ScanClosureBase() { }
|
||||
@ -64,6 +56,7 @@ protected:
|
||||
public:
|
||||
// This closure needs special handling for InstanceRefKlass.
|
||||
virtual ReferenceIterationMode reference_iteration_mode() { return DO_DISCOVERED_AND_DISCOVERY; }
|
||||
void set_region(HeapRegion* from) { _from = from; }
|
||||
};
|
||||
|
||||
// Used during the Update RS phase to refine remaining cards in the DCQ during garbage collection.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user