From dba61481035b7944173181ec9ee02aea41dd0e29 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Wed, 21 Dec 2016 08:20:29 -0800 Subject: Revert "Revert "Revert "Revert "Basic obsolete methods support"""" A GetDeclaringClass()->GetDexCache() got inserted during the merge/review process meaning that we would try to access incorrect dex-cache in obsolete methods in some situations. Also when using tracing we would loop forever (or at least until an OOM error) in test 916 due to tracing forcing InterpretOnly mode meaning methods would never be jitted. Bug: 32369913 Bug: 33630159 Test: ART_TEST_TRACE=true \ ART_TEST_JIT=true \ ART_TEST_INTERPRETER=true mma -j40 test-art-host This reverts commit f6abcda293b115a9d7d8a26376ea2dcf2d1dc510. Change-Id: I0773bfcba52e3cd51a83be815c6a50c189558f48 --- runtime/stack.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index 3fed7c9458..f9efc0b88f 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -618,6 +618,17 @@ std::string StackVisitor::DescribeLocation() const { return result; } +void StackVisitor::SetMethod(ArtMethod* method) { + DCHECK(GetMethod() != nullptr); + if (cur_shadow_frame_ != nullptr) { + cur_shadow_frame_->SetMethod(method); + } else { + DCHECK(cur_quick_frame_ != nullptr); + CHECK(!IsInInlinedFrame()) << "We do not support setting inlined method's ArtMethod!"; + *cur_quick_frame_ = method; + } +} + static void AssertPcIsWithinQuickCode(ArtMethod* method, uintptr_t pc) REQUIRES_SHARED(Locks::mutator_lock_) { if (method->IsNative() || method->IsRuntimeMethod() || method->IsProxyMethod()) { -- cgit v1.2.3-59-g8ed1b