From 8cd54547cec8a4537db5682c2da8be22843b1310 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Sun, 15 Jul 2018 23:58:44 +0100 Subject: 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 --- compiler/common_compiler_test.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'compiler/common_compiler_test.cc') 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 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 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()); std::vector* 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::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); -- cgit v1.2.3-59-g8ed1b