diff options
Diffstat (limited to 'runtime/instrumentation.cc')
| -rw-r--r-- | runtime/instrumentation.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc index deada4c5dc..2dd2b7d403 100644 --- a/runtime/instrumentation.cc +++ b/runtime/instrumentation.cc @@ -19,6 +19,7 @@ #include <sstream> #include "arch/context.h" +#include "art_code.h" #include "art_method-inl.h" #include "atomic.h" #include "class_linker.h" @@ -251,7 +252,7 @@ static void InstrumentationInstallStack(Thread* thread, void* arg) instrumentation_stack_->insert(it, instrumentation_frame); SetReturnPc(instrumentation_exit_pc_); } - dex_pcs_.push_back(m->ToDexPc(last_return_pc_)); + dex_pcs_.push_back(GetCurrentCode().ToDexPc(last_return_pc_)); last_return_pc_ = return_pc; ++instrumentation_stack_depth_; return true; // Continue. @@ -960,6 +961,15 @@ void Instrumentation::ExceptionCaughtEvent(Thread* thread, } } +// Computes a frame ID by ignoring inlined frames. +size_t Instrumentation::ComputeFrameId(Thread* self, + size_t frame_depth, + size_t inlined_frames_before_frame) { + CHECK_GE(frame_depth, inlined_frames_before_frame); + size_t no_inline_depth = frame_depth - inlined_frames_before_frame; + return StackVisitor::ComputeNumFrames(self, kInstrumentationStackWalk) - no_inline_depth; +} + static void CheckStackDepth(Thread* self, const InstrumentationStackFrame& instrumentation_frame, int delta) SHARED_REQUIRES(Locks::mutator_lock_) { |