Clean up OatQuickMethodHeader after Quick removal.
This reduces the size of the pre-header by 8 bytes, reducing
oat file size and mmapped .text section size. The memory
needed to store a CompiledMethod by dex2oat is also reduced,
for 32-bit dex2oat by 8B and for 64-bit dex2oat by 16B. The
aosp_flounder-userdebug 32-bit and 64-bit boot.oat are each
about 1.1MiB smaller.
Disable the broken StubTest.IMT, b/27991555 .
Change-Id: I05fe45c28c8ffb7a0fa8b1117b969786748b1039
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index daabc6e..abddc6d 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -30,9 +30,7 @@
// OatQuickMethodHeader precedes the raw code chunk generated by the compiler.
class PACKED(4) OatQuickMethodHeader {
public:
- OatQuickMethodHeader(uint32_t mapping_table_offset = 0U,
- uint32_t vmap_table_offset = 0U,
- uint32_t gc_map_offset = 0U,
+ OatQuickMethodHeader(uint32_t vmap_table_offset = 0U,
uint32_t frame_size_in_bytes = 0U,
uint32_t core_spill_mask = 0U,
uint32_t fp_spill_mask = 0U,
@@ -60,7 +58,7 @@
}
bool IsOptimized() const {
- return gc_map_offset_ == 0 && vmap_table_offset_ != 0;
+ return code_size_ != 0 && vmap_table_offset_ != 0;
}
const void* GetOptimizedCodeInfoPtr() const {
@@ -81,14 +79,6 @@
return code_size_;
}
- const uint8_t* GetNativeGcMap() const {
- return (gc_map_offset_ == 0) ? nullptr : code_ - gc_map_offset_;
- }
-
- const uint8_t* GetMappingTable() const {
- return (mapping_table_offset_ == 0) ? nullptr : code_ - mapping_table_offset_;
- }
-
const uint8_t* GetVmapTable() const {
CHECK(!IsOptimized()) << "Unimplemented vmap table for optimizing compiler";
return (vmap_table_offset_ == 0) ? nullptr : code_ - vmap_table_offset_;
@@ -135,12 +125,8 @@
uint32_t ToDexPc(ArtMethod* method, const uintptr_t pc, bool abort_on_failure = true) const;
- // The offset in bytes from the start of the mapping table to the end of the header.
- uint32_t mapping_table_offset_;
// The offset in bytes from the start of the vmap table to the end of the header.
uint32_t vmap_table_offset_;
- // The offset in bytes from the start of the gc map to the end of the header.
- uint32_t gc_map_offset_;
// The stack frame information.
QuickMethodFrameInfo frame_info_;
// The code size in bytes.