diff options
| author | 2017-06-01 09:17:34 -0700 | |
|---|---|---|
| committer | 2017-06-01 12:59:13 -0700 | |
| commit | 513061a792b22c417c938d31c19581390709561c (patch) | |
| tree | 80b4fdce03711170626aa5640d07b07de4a326a1 /runtime/stack.cc | |
| parent | 38c4ae5f4c5a033b7a7441032f39ea58f5772d4c (diff) | |
ART: Clean up thread.h and thread_list.h
Remove dependency on stack.h and gc_root.h. Remove unused object
callbacks include. Factor out ManagedStack into its own set of files.
Fix up users of transitive includes.
Test: m test-art-host
Change-Id: I01286c43d8c7710948c161b1348faabb05922e59
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index 5c6eead34b..8fcac1ea7f 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -29,6 +29,7 @@ #include "jit/jit.h" #include "jit/jit_code_cache.h" #include "linear_alloc.h" +#include "managed_stack.h" #include "mirror/class-inl.h" #include "mirror/object-inl.h" #include "mirror/object_array-inl.h" @@ -68,34 +69,6 @@ mirror::Object* ShadowFrame::GetThisObject(uint16_t num_ins) const { } } -size_t ManagedStack::NumJniShadowFrameReferences() const { - size_t count = 0; - for (const ManagedStack* current_fragment = this; current_fragment != nullptr; - current_fragment = current_fragment->GetLink()) { - for (ShadowFrame* current_frame = current_fragment->top_shadow_frame_; current_frame != nullptr; - current_frame = current_frame->GetLink()) { - if (current_frame->GetMethod()->IsNative()) { - // The JNI ShadowFrame only contains references. (For indirect reference.) - count += current_frame->NumberOfVRegs(); - } - } - } - return count; -} - -bool ManagedStack::ShadowFramesContain(StackReference<mirror::Object>* shadow_frame_entry) const { - for (const ManagedStack* current_fragment = this; current_fragment != nullptr; - current_fragment = current_fragment->GetLink()) { - for (ShadowFrame* current_frame = current_fragment->top_shadow_frame_; current_frame != nullptr; - current_frame = current_frame->GetLink()) { - if (current_frame->Contains(shadow_frame_entry)) { - return true; - } - } - } - return false; -} - StackVisitor::StackVisitor(Thread* thread, Context* context, StackWalkKind walk_kind, |