diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-10-16 17:13:34 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-10-20 11:52:11 +0100 |
commit | 524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02 (patch) | |
tree | ad07cc96f633bdae839ff2f1553d84b9c864a930 /runtime/stack.h | |
parent | b697c447eb61c2e14315166ec3b0d16375ae403c (diff) | |
download | art-524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02.tar.gz art-524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02.tar.bz2 art-524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02.zip |
Remove ArtCode.
- Instead use OatQuickMethodHeader.
- Various cleanups now that we don't have all those
ArtMethod -> ArtCode -> OatQuickMethodHeader indirections.
As a consequence of this cleanup, exception handling got a bit
faster.
ParserCombinators benchmark (exception intensive) on x64: (lower is better)
Before:
ParserCombinators(RunTime): 1062500.0 us.
After:
ParserCombinators(RunTime): 833000.0 us.
Change-Id: Idac917b6f1b0dc254ad68fb3781cd61bccadb0f3
Diffstat (limited to 'runtime/stack.h')
-rw-r--r-- | runtime/stack.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/runtime/stack.h b/runtime/stack.h index 3e0566d2f0..1f477b6a69 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -20,13 +20,13 @@ #include <stdint.h> #include <string> -#include "art_code.h" #include "arch/instruction_set.h" #include "base/macros.h" #include "base/mutex.h" #include "dex_file.h" #include "gc_root.h" #include "mirror/object_reference.h" +#include "quick/quick_method_frame_info.h" #include "read_barrier.h" #include "verify_object.h" @@ -40,6 +40,7 @@ class ArtMethod; class Context; class HandleScope; class InlineInfo; +class OatQuickMethodHeader; class ScopedObjectAccess; class ShadowFrame; class StackVisitor; @@ -561,18 +562,6 @@ class StackVisitor { size_t GetNativePcOffset() const SHARED_REQUIRES(Locks::mutator_lock_); - uintptr_t* CalleeSaveAddress(int num, size_t frame_size) const - SHARED_REQUIRES(Locks::mutator_lock_) { - // Callee saves are held at the top of the frame - DCHECK(GetMethod() != nullptr); - uint8_t* save_addr = - reinterpret_cast<uint8_t*>(cur_quick_frame_) + frame_size - ((num + 1) * sizeof(void*)); -#if defined(__i386__) || defined(__x86_64__) - save_addr -= sizeof(void*); // account for return address -#endif - return reinterpret_cast<uintptr_t*>(save_addr); - } - // Returns the height of the stack in the managed stack frames, including transitions. size_t GetFrameHeight() SHARED_REQUIRES(Locks::mutator_lock_) { return GetNumFrames() - cur_depth_ - 1; @@ -735,7 +724,11 @@ class StackVisitor { static void DescribeStack(Thread* thread) SHARED_REQUIRES(Locks::mutator_lock_); - ArtCode GetCurrentCode() const { return ArtCode(cur_quick_frame_); } + const OatQuickMethodHeader* GetCurrentOatQuickMethodHeader() const { + return cur_oat_quick_method_header_; + } + + QuickMethodFrameInfo GetCurrentQuickFrameInfo() const SHARED_REQUIRES(Locks::mutator_lock_); private: // Private constructor known in the case that num_frames_ has already been computed. @@ -813,6 +806,7 @@ class StackVisitor { ShadowFrame* cur_shadow_frame_; ArtMethod** cur_quick_frame_; uintptr_t cur_quick_frame_pc_; + const OatQuickMethodHeader* cur_oat_quick_method_header_; // Lazily computed, number of frames in the stack. size_t num_frames_; // Depth of the frame we're currently at. |