summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2018-07-15 23:58:44 +0100
committerDavid Srbecky <dsrbecky@google.com>2018-08-01 14:49:40 +0100
commit8cd54547cec8a4537db5682c2da8be22843b1310 (patch)
treefb1158993bab2e027984cedab59b402c051a45a7 /compiler/common_compiler_test.cc
parent91f0fdb4372d3f2bcfcd9db67afcbe7ee1901048 (diff)
Move MethodInfo to CodeInfo.
There is no need to treat it specially any more, because of the de-duplication at BitTable level. This saves 0.6% of oat file size. Test: test-art-host-gtest Change-Id: Ife7927d736243879a41d6f325d49ebf6930a63f6
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 4824763288..87197becf9 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -65,23 +65,17 @@ void CommonCompilerTest::MakeExecutable(ArtMethod* method) {
ArrayRef<const uint8_t> vmap_table = compiled_method->GetVmapTable();
const uint32_t vmap_table_offset = vmap_table.empty() ? 0u
: sizeof(OatQuickMethodHeader) + vmap_table.size();
- // The method info is directly before the vmap table.
- ArrayRef<const uint8_t> method_info = compiled_method->GetMethodInfo();
- const uint32_t method_info_offset = method_info.empty() ? 0u
- : vmap_table_offset + method_info.size();
-
- OatQuickMethodHeader method_header(vmap_table_offset, method_info_offset, code_size);
+ OatQuickMethodHeader method_header(vmap_table_offset, code_size);
header_code_and_maps_chunks_.push_back(std::vector<uint8_t>());
std::vector<uint8_t>* chunk = &header_code_and_maps_chunks_.back();
const size_t max_padding = GetInstructionSetAlignment(compiled_method->GetInstructionSet());
- const size_t size = method_info.size() + vmap_table.size() + sizeof(method_header) + code_size;
+ const size_t size = vmap_table.size() + sizeof(method_header) + code_size;
chunk->reserve(size + max_padding);
chunk->resize(sizeof(method_header));
static_assert(std::is_trivially_copyable<OatQuickMethodHeader>::value, "Cannot use memcpy");
memcpy(&(*chunk)[0], &method_header, sizeof(method_header));
chunk->insert(chunk->begin(), vmap_table.begin(), vmap_table.end());
- chunk->insert(chunk->begin(), method_info.begin(), method_info.end());
chunk->insert(chunk->end(), code.begin(), code.end());
CHECK_EQ(chunk->size(), size);
const void* unaligned_code_ptr = chunk->data() + (size - code_size);