Remove frame info from OatQuickMethodHeader.
The information has been moved to CodeInfo,
where it is stored in much more compact way.
The old CL which added the data to CodeInfo cost 0.7%.
This CL saves 2.5% of .oat file size so a win overall.
Test: test-art-host-gtest
Change-Id: I07fcf6f2776c96218f995ba3b57a1e6ccbf5e317
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index 1e4ca3e..3b9f466 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -32,12 +32,13 @@
class PACKED(4) OatQuickMethodHeader {
public:
OatQuickMethodHeader() = default;
- explicit OatQuickMethodHeader(uint32_t vmap_table_offset,
- uint32_t method_info_offset,
- uint32_t frame_size_in_bytes,
- uint32_t core_spill_mask,
- uint32_t fp_spill_mask,
- uint32_t code_size);
+ OatQuickMethodHeader(uint32_t vmap_table_offset,
+ uint32_t method_info_offset,
+ uint32_t code_size)
+ : vmap_table_offset_(vmap_table_offset),
+ method_info_offset_(method_info_offset),
+ code_size_(code_size) {
+ }
static OatQuickMethodHeader* FromCodePointer(const void* code_ptr) {
uintptr_t code = reinterpret_cast<uintptr_t>(code_ptr);
@@ -151,7 +152,7 @@
template <bool kCheckFrameSize = true>
uint32_t GetFrameSizeInBytes() const {
- uint32_t result = frame_info_.FrameSizeInBytes();
+ uint32_t result = GetFrameInfo().FrameSizeInBytes();
if (kCheckFrameSize) {
DCHECK_ALIGNED(result, kStackAlignment);
}
@@ -160,11 +161,7 @@
QuickMethodFrameInfo GetFrameInfo() const {
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;
+ return CodeInfo::DecodeFrameInfo(GetOptimizedCodeInfoPtr());
}
uintptr_t ToNativeQuickPc(ArtMethod* method,
@@ -194,8 +191,6 @@
// would be lost from doing so. The method info memory region contains method indices since they
// are hard to dedupe.
uint32_t method_info_offset_ = 0u;
- // The stack frame information.
- QuickMethodFrameInfo frame_info_;
// The code size in bytes. The highest bit is used to signify if the compiled
// code with the method header has should_deoptimize flag.
uint32_t code_size_ = 0u;