8144505: Change G1ParCopyHelper to inherit OopClosure
Reviewed-by: mgerdin, stefank
This commit is contained in:
parent
f6440f7fb1
commit
27c56ca8af
@ -31,7 +31,8 @@
|
||||
#include "utilities/stack.inline.hpp"
|
||||
|
||||
G1ParCopyHelper::G1ParCopyHelper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
|
||||
G1ParClosureSuper(g1, par_scan_state),
|
||||
_g1(g1),
|
||||
_par_scan_state(par_scan_state),
|
||||
_worker_id(par_scan_state->worker_id()),
|
||||
_scanned_klass(NULL),
|
||||
_cm(_g1->concurrent_mark())
|
||||
|
@ -86,8 +86,10 @@ public:
|
||||
};
|
||||
|
||||
// Add back base class for metadata
|
||||
class G1ParCopyHelper : public G1ParClosureSuper {
|
||||
class G1ParCopyHelper : public OopClosure {
|
||||
protected:
|
||||
G1CollectedHeap* _g1;
|
||||
G1ParScanThreadState* _par_scan_state;
|
||||
uint _worker_id; // Cache value from par_scan_state.
|
||||
Klass* _scanned_klass;
|
||||
ConcurrentMark* _cm;
|
||||
@ -125,13 +127,11 @@ template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
|
||||
class G1ParCopyClosure : public G1ParCopyHelper {
|
||||
public:
|
||||
G1ParCopyClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
|
||||
G1ParCopyHelper(g1, par_scan_state) {
|
||||
assert(ref_processor() == NULL, "sanity");
|
||||
}
|
||||
G1ParCopyHelper(g1, par_scan_state) { }
|
||||
|
||||
template <class T> void do_oop_nv(T* p);
|
||||
virtual void do_oop(oop* p) { do_oop_nv(p); }
|
||||
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
|
||||
template <class T> void do_oop_work(T* p);
|
||||
virtual void do_oop(oop* p) { do_oop_work(p); }
|
||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||
};
|
||||
|
||||
class G1KlassScanClosure : public KlassClosure {
|
||||
|
@ -256,7 +256,7 @@ void G1ParCopyHelper::mark_forwarded_object(oop from_obj, oop to_obj) {
|
||||
|
||||
template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
|
||||
template <class T>
|
||||
void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_nv(T* p) {
|
||||
void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_work(T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
|
||||
if (oopDesc::is_null(heap_oop)) {
|
||||
|
Loading…
Reference in New Issue
Block a user