8297573: Parallel: Rename do_oop_nv to do_oop_work in subclasses of OopClosure

Reviewed-by: ayang, gli
This commit is contained in:
Lei Zaakjyu 2024-01-02 08:45:55 +00:00 committed by Albert Mingkun Yang
parent 7c1d481d6d
commit be0e1c7b14
3 changed files with 12 additions and 12 deletions

View File

@ -47,9 +47,9 @@ private:
public:
PCMarkAndPushClosure(ParCompactionManager* cm) : _compaction_manager(cm) { }
template <typename T> void do_oop_nv(T* p) { _compaction_manager->mark_and_push(p); }
virtual void do_oop(oop* p) { do_oop_nv(p); }
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
template <typename T> void do_oop_work(T* p) { _compaction_manager->mark_and_push(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
};
class PCIterateMarkAndPushClosure: public ClaimMetadataVisitingOopIterateClosure {
@ -60,9 +60,9 @@ public:
ClaimMetadataVisitingOopIterateClosure(ClassLoaderData::_claim_stw_fullgc_mark, rp),
_compaction_manager(cm) { }
template <typename T> void do_oop_nv(T* p) { _compaction_manager->mark_and_push(p); }
virtual void do_oop(oop* p) { do_oop_nv(p); }
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
template <typename T> void do_oop_work(T* p) { _compaction_manager->mark_and_push(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
};
inline bool ParCompactionManager::steal(int queue_num, oop& t) {

View File

@ -130,9 +130,9 @@ class PCAdjustPointerClosure: public BasicOopIterateClosure {
public:
PCAdjustPointerClosure(ParCompactionManager* cm) : _cm(cm) {
}
template <typename T> void do_oop_nv(T* p) { PSParallelCompact::adjust_pointer(p, _cm); }
virtual void do_oop(oop* p) { do_oop_nv(p); }
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
template <typename T> void do_oop_work(T* p) { PSParallelCompact::adjust_pointer(p, _cm); }
virtual void do_oop(oop* p) { do_oop_work(p); }
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }
private:

View File

@ -95,14 +95,14 @@ class PSPushContentsClosure: public BasicOopIterateClosure {
public:
PSPushContentsClosure(PSPromotionManager* pm) : BasicOopIterateClosure(PSScavenge::reference_processor()), _pm(pm) {}
template <typename T> void do_oop_nv(T* p) {
template <typename T> void do_oop_work(T* p) {
if (PSScavenge::should_scavenge(p)) {
_pm->claim_or_forward_depth(p);
}
}
virtual void do_oop(oop* p) { do_oop_nv(p); }
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
};
//