diff options
Diffstat (limited to 'runtime/monitor.cc')
| -rw-r--r-- | runtime/monitor.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc index dc016a5006..4be25d6946 100644 --- a/runtime/monitor.cc +++ b/runtime/monitor.cc @@ -21,6 +21,7 @@ #include <cutils/trace.h> #include <vector> +#include "art_method-inl.h" #include "base/mutex.h" #include "base/stl_util.h" #include "base/time_utils.h" @@ -28,7 +29,6 @@ #include "dex_file-inl.h" #include "dex_instruction.h" #include "lock_word-inl.h" -#include "mirror/art_method-inl.h" #include "mirror/class-inl.h" #include "mirror/object-inl.h" #include "mirror/object_array-inl.h" @@ -245,7 +245,7 @@ void Monitor::Lock(Thread* self) { // Contended. const bool log_contention = (lock_profiling_threshold_ != 0); uint64_t wait_start_ms = log_contention ? MilliTime() : 0; - mirror::ArtMethod* owners_method = locking_method_; + ArtMethod* owners_method = locking_method_; uint32_t owners_dex_pc = locking_dex_pc_; // Do this before releasing the lock so that we don't get deflated. size_t num_waiters = num_waiters_; @@ -449,7 +449,7 @@ void Monitor::Wait(Thread* self, int64_t ms, int32_t ns, int prev_lock_count = lock_count_; lock_count_ = 0; owner_ = nullptr; - mirror::ArtMethod* saved_method = locking_method_; + ArtMethod* saved_method = locking_method_; locking_method_ = nullptr; uintptr_t saved_dex_pc = locking_dex_pc_; locking_dex_pc_ = 0; @@ -994,14 +994,15 @@ mirror::Object* Monitor::GetContendedMonitor(Thread* thread) { void Monitor::VisitLocks(StackVisitor* stack_visitor, void (*callback)(mirror::Object*, void*), void* callback_context, bool abort_on_failure) { - mirror::ArtMethod* m = stack_visitor->GetMethod(); + ArtMethod* m = stack_visitor->GetMethod(); CHECK(m != nullptr); // Native methods are an easy special case. // TODO: use the JNI implementation's table of explicit MonitorEnter calls and dump those too. if (m->IsNative()) { if (m->IsSynchronized()) { - mirror::Object* jni_this = stack_visitor->GetCurrentHandleScope()->GetReference(0); + mirror::Object* jni_this = + stack_visitor->GetCurrentHandleScope(sizeof(void*))->GetReference(0); callback(jni_this, callback_context); } return; @@ -1087,7 +1088,7 @@ bool Monitor::IsLocked() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return owner_ != nullptr; } -void Monitor::TranslateLocation(mirror::ArtMethod* method, uint32_t dex_pc, +void Monitor::TranslateLocation(ArtMethod* method, uint32_t dex_pc, const char** source_file, uint32_t* line_number) const { // If method is null, location is unknown if (method == nullptr) { |