< prev index next > src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp
Print this page
/*
* Copyright (c) 2015, 2022, Red Hat, Inc. All rights reserved.
+ * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
#include "runtime/javaThread.hpp"
class ShenandoahMarkRefsSuperClosure : public MetadataVisitingOopIterateClosure {
private:
ShenandoahObjToScanQueue* _queue;
+ ShenandoahObjToScanQueue* _old_queue;
ShenandoahMarkingContext* const _mark_context;
bool _weak;
protected:
template <class T, ShenandoahGenerationType GENERATION>
void work(T *p);
public:
- ShenandoahMarkRefsSuperClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp);
+ ShenandoahMarkRefsSuperClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp, ShenandoahObjToScanQueue* old_q);
bool is_weak() const {
return _weak;
}
template <class T, ShenandoahGenerationType GENERATION>
inline void work(T* p);
public:
- ShenandoahMarkUpdateRefsSuperClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp) :
- ShenandoahMarkRefsSuperClosure(q, rp),
+ ShenandoahMarkUpdateRefsSuperClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp, ShenandoahObjToScanQueue* old_q) :
+ ShenandoahMarkRefsSuperClosure(q, rp, old_q),
_heap(ShenandoahHeap::heap()) {
assert(_heap->is_stw_gc_in_progress(), "Can only be used for STW GC");
};
};
private:
template <class T>
inline void do_oop_work(T* p) { work<T, GENERATION>(p); }
public:
- ShenandoahMarkUpdateRefsClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp) :
- ShenandoahMarkUpdateRefsSuperClosure(q, rp) {}
+ ShenandoahMarkUpdateRefsClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp, ShenandoahObjToScanQueue* old_q) :
+ ShenandoahMarkUpdateRefsSuperClosure(q, rp, old_q) {}
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
};
private:
template <class T>
inline void do_oop_work(T* p) { work<T, GENERATION>(p); }
public:
- ShenandoahMarkRefsClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp) :
- ShenandoahMarkRefsSuperClosure(q, rp) {};
+ ShenandoahMarkRefsClosure(ShenandoahObjToScanQueue* q, ShenandoahReferenceProcessor* rp, ShenandoahObjToScanQueue* old_q) :
+ ShenandoahMarkRefsSuperClosure(q, rp, old_q) {};
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
virtual void do_oop(oop* p) { do_oop_work(p); }
};
-
class ShenandoahUpdateRefsSuperClosure : public ShenandoahOopClosureBase {
protected:
ShenandoahHeap* _heap;
public:
< prev index next >