Introduce the notion of an nterp frame.
See comments in nterp_helpers.cc. An nterp frame follows the
calling conventions and exception handling of the compiler. There are
no ManagedStack transitions, and the compiler and interpreter can
just call each other directly.
For the stack walker, an nterp frame looks like a compiled frame.
This CL introduces an nterp frame, another CL will contain an
implementation for x64.
Bug: 119800099
Test: test.py
Change-Id: Ie9b691f58908b7f283b4cd63b84b651526155d27
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index 0d08149..c8ee9b4 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -18,6 +18,7 @@
#define ART_RUNTIME_OAT_QUICK_METHOD_HEADER_H_
#include "arch/instruction_set.h"
+#include "base/locks.h"
#include "base/macros.h"
#include "base/utils.h"
#include "quick/quick_method_frame_info.h"
@@ -37,6 +38,10 @@
code_size_(code_size) {
}
+ static OatQuickMethodHeader* NterpMethodHeader;
+
+ bool IsNterpMethodHeader() const;
+
static OatQuickMethodHeader* FromCodePointer(const void* code_ptr) {
uintptr_t code = reinterpret_cast<uintptr_t>(code_ptr);
uintptr_t header = code - OFFSETOF_MEMBER(OatQuickMethodHeader, code_);
@@ -150,7 +155,8 @@
uint32_t ToDexPc(ArtMethod** frame,
const uintptr_t pc,
- bool abort_on_failure = true) const;
+ bool abort_on_failure = true) const
+ REQUIRES_SHARED(Locks::mutator_lock_);
void SetHasShouldDeoptimizeFlag() {
DCHECK_EQ(code_size_ & kShouldDeoptimizeMask, 0u);