diff options
author | David Srbecky <dsrbecky@google.com> | 2018-06-23 22:05:53 +0100 |
---|---|---|
committer | David Srbecky <dsrbecky@google.com> | 2018-07-04 15:14:19 +0000 |
commit | 691124fa1bbd0636225afda657712b649ab4d2ba (patch) | |
tree | 7b13a14f0ce6d6ca11de3957664c2a44c359e8a2 /runtime/oat_quick_method_header.h | |
parent | 64cdf56aeac47ab2dfd4f6437f976de9a9ad372d (diff) | |
download | art-691124fa1bbd0636225afda657712b649ab4d2ba.tar.gz art-691124fa1bbd0636225afda657712b649ab4d2ba.tar.bz2 art-691124fa1bbd0636225afda657712b649ab4d2ba.zip |
Use frame info from CodeInfo.
Still keep the other copy around for verification.
Test: test-art-host-gtest
Change-Id: Iae4672e52d7ff3006d8f2b6238aecfac6101a1d8
Diffstat (limited to 'runtime/oat_quick_method_header.h')
-rw-r--r-- | runtime/oat_quick_method_header.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h index 3d5be3650b..1e4ca3e450 100644 --- a/runtime/oat_quick_method_header.h +++ b/runtime/oat_quick_method_header.h @@ -22,6 +22,7 @@ #include "base/utils.h" #include "method_info.h" #include "quick/quick_method_frame_info.h" +#include "stack_map.h" namespace art { @@ -62,9 +63,9 @@ class PACKED(4) OatQuickMethodHeader { return GetCodeSize() != 0 && vmap_table_offset_ != 0; } - const void* GetOptimizedCodeInfoPtr() const { + const uint8_t* GetOptimizedCodeInfoPtr() const { DCHECK(IsOptimized()); - return reinterpret_cast<const void*>(code_ - vmap_table_offset_); + return code_ - vmap_table_offset_; } uint8_t* GetOptimizedCodeInfoPtr() { @@ -158,7 +159,12 @@ class PACKED(4) OatQuickMethodHeader { } QuickMethodFrameInfo GetFrameInfo() const { - return frame_info_; + DCHECK(IsOptimized()); + QuickMethodFrameInfo frame_info = CodeInfo::DecodeFrameInfo(GetOptimizedCodeInfoPtr()); + DCHECK_EQ(frame_info.FrameSizeInBytes(), frame_info_.FrameSizeInBytes()); + DCHECK_EQ(frame_info.CoreSpillMask(), frame_info_.CoreSpillMask()); + DCHECK_EQ(frame_info.FpSpillMask(), frame_info_.FpSpillMask()); + return frame_info; } uintptr_t ToNativeQuickPc(ArtMethod* method, |