8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHCLOSURES_HPP
25 #define SHARE_GC_SHENANDOAH_SHENANDOAHCLOSURES_HPP
26
27 #include "memory/iterator.hpp"
28
29 class ShenandoahHeap;
30 class ShenandoahMarkingContext;
31 class ShenandoahHeapRegionSet;
32 class Thread;
33
34 class ShenandoahForwardedIsAliveClosure: public BoolObjectClosure {
35 private:
36 ShenandoahMarkingContext* const _mark_context;
37 public:
38 inline ShenandoahForwardedIsAliveClosure();
39 inline bool do_object_b(oop obj);
40 };
41
42 class ShenandoahIsAliveClosure: public BoolObjectClosure {
43 private:
44 ShenandoahMarkingContext* const _mark_context;
45 public:
46 inline ShenandoahIsAliveClosure();
47 inline bool do_object_b(oop obj);
64 inline void do_oop(narrowOop* p);
65 private:
66 template <class T>
67 inline void do_oop_work(T* p);
68 };
69
70 class ShenandoahTraversalUpdateRefsClosure: public OopClosure {
71 private:
72 ShenandoahHeap* const _heap;
73 ShenandoahHeapRegionSet* const _traversal_set;
74
75 public:
76 inline ShenandoahTraversalUpdateRefsClosure();
77 inline void do_oop(oop* p);
78 inline void do_oop(narrowOop* p);
79 private:
80 template <class T>
81 inline void do_oop_work(T* p);
82 };
83
84 class ShenandoahEvacuateUpdateRootsClosure: public BasicOopIterateClosure {
85 private:
86 ShenandoahHeap* _heap;
87 Thread* _thread;
88 public:
89 inline ShenandoahEvacuateUpdateRootsClosure();
90 inline void do_oop(oop* p);
91 inline void do_oop(narrowOop* p);
92
93 private:
94 template <class T>
95 inline void do_oop_work(T* p);
96 };
97
98 class ShenandoahEvacUpdateOopStorageRootsClosure : public BasicOopIterateClosure {
99 private:
100 ShenandoahHeap* _heap;
101 Thread* _thread;
102 public:
103 inline ShenandoahEvacUpdateOopStorageRootsClosure();
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHCLOSURES_HPP
25 #define SHARE_GC_SHENANDOAH_SHENANDOAHCLOSURES_HPP
26
27 #include "memory/iterator.hpp"
28 #include "oops/accessDecorators.hpp"
29
30 class ShenandoahHeap;
31 class ShenandoahMarkingContext;
32 class ShenandoahHeapRegionSet;
33 class Thread;
34
35 class ShenandoahForwardedIsAliveClosure: public BoolObjectClosure {
36 private:
37 ShenandoahMarkingContext* const _mark_context;
38 public:
39 inline ShenandoahForwardedIsAliveClosure();
40 inline bool do_object_b(oop obj);
41 };
42
43 class ShenandoahIsAliveClosure: public BoolObjectClosure {
44 private:
45 ShenandoahMarkingContext* const _mark_context;
46 public:
47 inline ShenandoahIsAliveClosure();
48 inline bool do_object_b(oop obj);
65 inline void do_oop(narrowOop* p);
66 private:
67 template <class T>
68 inline void do_oop_work(T* p);
69 };
70
71 class ShenandoahTraversalUpdateRefsClosure: public OopClosure {
72 private:
73 ShenandoahHeap* const _heap;
74 ShenandoahHeapRegionSet* const _traversal_set;
75
76 public:
77 inline ShenandoahTraversalUpdateRefsClosure();
78 inline void do_oop(oop* p);
79 inline void do_oop(narrowOop* p);
80 private:
81 template <class T>
82 inline void do_oop_work(T* p);
83 };
84
85 template <DecoratorSet MO = MO_UNORDERED>
86 class ShenandoahEvacuateUpdateRootsClosure: public BasicOopIterateClosure {
87 private:
88 ShenandoahHeap* _heap;
89 Thread* _thread;
90 public:
91 inline ShenandoahEvacuateUpdateRootsClosure();
92 inline void do_oop(oop* p);
93 inline void do_oop(narrowOop* p);
94
95 private:
96 template <class T>
97 inline void do_oop_work(T* p);
98 };
99
100 class ShenandoahEvacUpdateOopStorageRootsClosure : public BasicOopIterateClosure {
101 private:
102 ShenandoahHeap* _heap;
103 Thread* _thread;
104 public:
105 inline ShenandoahEvacUpdateOopStorageRootsClosure();
|