equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
44 virtual void do_oop(oop* p); |
44 virtual void do_oop(oop* p); |
45 virtual void do_oop(narrowOop* p); |
45 virtual void do_oop(narrowOop* p); |
46 }; |
46 }; |
47 |
47 |
48 template <bool finalizable> |
48 template <bool finalizable> |
49 class ZMarkBarrierOopClosure : public MetadataVisitingOopIterateClosure { |
49 class ZMarkBarrierOopClosure : public ClaimMetadataVisitingOopIterateClosure { |
50 public: |
50 public: |
51 ZMarkBarrierOopClosure(); |
51 ZMarkBarrierOopClosure(); |
52 |
52 |
53 virtual void do_oop(oop* p); |
53 virtual void do_oop(oop* p); |
54 virtual void do_oop(narrowOop* p); |
54 virtual void do_oop(narrowOop* p); |
55 |
|
56 virtual void do_klass(Klass* k); |
|
57 virtual void do_cld(ClassLoaderData* cld); |
|
58 |
55 |
59 #ifdef ASSERT |
56 #ifdef ASSERT |
60 virtual bool should_verify_oops() { |
57 virtual bool should_verify_oops() { |
61 return false; |
58 return false; |
62 } |
59 } |
78 public: |
75 public: |
79 virtual void do_oop(oop* p); |
76 virtual void do_oop(oop* p); |
80 virtual void do_oop(narrowOop* p); |
77 virtual void do_oop(narrowOop* p); |
81 }; |
78 }; |
82 |
79 |
83 class ZVerifyOopClosure : public ZRootsIteratorClosure, public BasicOopIterateClosure { |
|
84 public: |
|
85 virtual void do_oop(oop* p); |
|
86 virtual void do_oop(narrowOop* p); |
|
87 |
|
88 virtual ReferenceIterationMode reference_iteration_mode() { |
|
89 return DO_FIELDS; |
|
90 } |
|
91 |
|
92 #ifdef ASSERT |
|
93 // Verification handled by the closure itself |
|
94 virtual bool should_verify_oops() { |
|
95 return false; |
|
96 } |
|
97 #endif |
|
98 }; |
|
99 |
|
100 class ZVerifyObjectClosure : public ObjectClosure { |
|
101 public: |
|
102 virtual void do_object(oop o); |
|
103 }; |
|
104 |
|
105 #endif // SHARE_GC_Z_ZOOPCLOSURES_HPP |
80 #endif // SHARE_GC_Z_ZOOPCLOSURES_HPP |