From cbcedbf9382bc773713cd3552ed96f417bf1daeb Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Sun, 12 Mar 2017 22:24:50 -0700 Subject: Add method info to oat files The method info data is stored separately from the code info to reduce oat size by improving deduplication of stack maps. To reduce code size, this moves the invoke info and inline info method indices to this table. Oat size for a large app (arm64): 77746816 -> 74023552 (-4.8%) Average oat size reduction for golem (arm64): 2% Repurposed unused SrcMapElem deduping to be for MethodInfo. TODO: Delete SrcMapElem in a follow up CL. Bug: 36124906 Test: clean-oat-host && test-art-host-run-test Change-Id: I2241362e728389030b959f42161ce817cf6e2009 --- compiler/compiled_method.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler/compiled_method.cc') diff --git a/compiler/compiled_method.cc b/compiler/compiled_method.cc index f06d90c81c..0d9021fcfb 100644 --- a/compiler/compiled_method.cc +++ b/compiler/compiled_method.cc @@ -105,15 +105,15 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, const size_t frame_size_in_bytes, const uint32_t core_spill_mask, const uint32_t fp_spill_mask, - const ArrayRef& src_mapping_table, + const ArrayRef& method_info, const ArrayRef& vmap_table, const ArrayRef& cfi_info, const ArrayRef& patches) : CompiledCode(driver, instruction_set, quick_code), - frame_size_in_bytes_(frame_size_in_bytes), core_spill_mask_(core_spill_mask), + frame_size_in_bytes_(frame_size_in_bytes), + core_spill_mask_(core_spill_mask), fp_spill_mask_(fp_spill_mask), - src_mapping_table_( - driver->GetCompiledMethodStorage()->DeduplicateSrcMappingTable(src_mapping_table)), + method_info_(driver->GetCompiledMethodStorage()->DeduplicateMethodInfo(method_info)), vmap_table_(driver->GetCompiledMethodStorage()->DeduplicateVMapTable(vmap_table)), cfi_info_(driver->GetCompiledMethodStorage()->DeduplicateCFIInfo(cfi_info)), patches_(driver->GetCompiledMethodStorage()->DeduplicateLinkerPatches(patches)) { @@ -126,7 +126,7 @@ CompiledMethod* CompiledMethod::SwapAllocCompiledMethod( const size_t frame_size_in_bytes, const uint32_t core_spill_mask, const uint32_t fp_spill_mask, - const ArrayRef& src_mapping_table, + const ArrayRef& method_info, const ArrayRef& vmap_table, const ArrayRef& cfi_info, const ArrayRef& patches) { @@ -139,7 +139,7 @@ CompiledMethod* CompiledMethod::SwapAllocCompiledMethod( frame_size_in_bytes, core_spill_mask, fp_spill_mask, - src_mapping_table, + method_info, vmap_table, cfi_info, patches); return ret; @@ -156,7 +156,7 @@ CompiledMethod::~CompiledMethod() { storage->ReleaseLinkerPatches(patches_); storage->ReleaseCFIInfo(cfi_info_); storage->ReleaseVMapTable(vmap_table_); - storage->ReleaseSrcMappingTable(src_mapping_table_); + storage->ReleaseMethodInfo(method_info_); } } // namespace art -- cgit v1.2.3-59-g8ed1b