summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2018-12-05 13:24:06 +0000
committer David Srbecky <dsrbecky@google.com> 2018-12-14 16:47:38 +0000
commit0b21e41260bea6c078c18eba745d43e549230fd0 (patch)
tree25e41920b8a38d01ec904a2d1a1498c1364c07fb /compiler/optimizing/optimizing_compiler.cc
parent889e29aae6a7cbd3c6f8dae44f67e054e083a8b6 (diff)
Pack JIT mini-debug-infos together.
We currently produce one in-memory ELF file per JITed method, which has significant overheads due to the ELF file headers. Pack several of those files together regularly to save space. Similarly, prune information about methods which were GCed. This reduces the size of JIT mini-debug-info by factor of 10. The final overhead is 5% to 10% relative to the JIT code size. Test: ./art/test.py -b -r -t 137 Change-Id: Idfaff8ed9a209e871e815e527f24f36c63a57bbf
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index c9b4d36bc4..4936a6d3c0 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1456,8 +1456,8 @@ bool OptimizingCompiler::JitCompile(Thread* self,
return true;
}
-void OptimizingCompiler::GenerateJitDebugInfo(
- ArtMethod* method, const debug::MethodDebugInfo& info) {
+void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method ATTRIBUTE_UNUSED,
+ const debug::MethodDebugInfo& info) {
const CompilerOptions& compiler_options = GetCompilerDriver()->GetCompilerOptions();
DCHECK(compiler_options.GenerateAnyDebugInfo());
@@ -1472,12 +1472,10 @@ void OptimizingCompiler::GenerateJitDebugInfo(
info);
AddNativeDebugInfoForJit(Thread::Current(),
reinterpret_cast<const void*>(info.code_address),
- elf_file);
-
- VLOG(jit)
- << "JIT mini-debug-info added for " << ArtMethod::PrettyMethod(method)
- << " size=" << PrettySize(elf_file.size())
- << " total_size=" << PrettySize(GetJitMiniDebugInfoMemUsage());
+ elf_file,
+ debug::PackElfFileForJIT,
+ compiler_options.GetInstructionSet(),
+ compiler_options.GetInstructionSetFeatures());
}
} // namespace art