39 #include "runtime/mutexLocker.hpp" |
39 #include "runtime/mutexLocker.hpp" |
40 #include "runtime/threadSMR.inline.hpp" |
40 #include "runtime/threadSMR.inline.hpp" |
41 #include "runtime/vframe_hp.hpp" |
41 #include "runtime/vframe_hp.hpp" |
42 #include "services/management.hpp" |
42 #include "services/management.hpp" |
43 #include "utilities/growableArray.hpp" |
43 #include "utilities/growableArray.hpp" |
44 #if INCLUDE_JVMCI |
|
45 #include "jvmci/jvmci.hpp" |
|
46 #endif |
|
47 |
44 |
48 class ReferenceLocateClosure : public OopClosure { |
45 class ReferenceLocateClosure : public OopClosure { |
49 protected: |
46 protected: |
50 RootCallback& _callback; |
47 RootCallback& _callback; |
51 RootCallbackInfo _info; |
48 RootCallbackInfo _info; |
104 bool do_jvmti_roots(); |
101 bool do_jvmti_roots(); |
105 bool do_system_dictionary_roots(); |
102 bool do_system_dictionary_roots(); |
106 bool do_management_roots(); |
103 bool do_management_roots(); |
107 bool do_string_table_roots(); |
104 bool do_string_table_roots(); |
108 bool do_aot_loader_roots(); |
105 bool do_aot_loader_roots(); |
109 JVMCI_ONLY(bool do_jvmci_roots();) |
|
110 |
106 |
111 bool do_roots(); |
107 bool do_roots(); |
112 |
108 |
113 public: |
109 public: |
114 ReferenceToRootClosure(RootCallback& callback) : _callback(callback), |
110 ReferenceToRootClosure(RootCallback& callback) : _callback(callback), |
191 ReferenceLocateClosure rcl(_callback, OldObjectRoot::_aot, OldObjectRoot::_type_undetermined, NULL); |
187 ReferenceLocateClosure rcl(_callback, OldObjectRoot::_aot, OldObjectRoot::_type_undetermined, NULL); |
192 AOTLoader::oops_do(&rcl); |
188 AOTLoader::oops_do(&rcl); |
193 return rcl.complete(); |
189 return rcl.complete(); |
194 } |
190 } |
195 |
191 |
196 #if INCLUDE_JVMCI |
|
197 bool ReferenceToRootClosure::do_jvmci_roots() { |
|
198 assert(!complete(), "invariant"); |
|
199 ReferenceLocateClosure rcl(_callback, OldObjectRoot::_jvmci, OldObjectRoot::_type_undetermined, NULL); |
|
200 JVMCI::oops_do(&rcl); |
|
201 return rcl.complete(); |
|
202 } |
|
203 #endif |
|
204 |
|
205 bool ReferenceToRootClosure::do_roots() { |
192 bool ReferenceToRootClosure::do_roots() { |
206 assert(!complete(), "invariant"); |
193 assert(!complete(), "invariant"); |
207 assert(OldObjectRoot::_system_undetermined == _info._system, "invariant"); |
194 assert(OldObjectRoot::_system_undetermined == _info._system, "invariant"); |
208 assert(OldObjectRoot::_type_undetermined == _info._type, "invariant"); |
195 assert(OldObjectRoot::_type_undetermined == _info._type, "invariant"); |
209 |
196 |