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
diff --git a/compiler/debug/elf_debug_writer.h b/compiler/debug/elf_debug_writer.h
index 8ad0c42..85ab356 100644
--- a/compiler/debug/elf_debug_writer.h
+++ b/compiler/debug/elf_debug_writer.h
@@ -56,6 +56,13 @@
     bool mini_debug_info,
     const MethodDebugInfo& method_info);
 
+std::vector<uint8_t> PackElfFileForJIT(
+    InstructionSet isa,
+    const InstructionSetFeatures* features,
+    std::vector<const uint8_t*>& added_elf_files,
+    std::vector<const void*>& removed_symbols,
+    /*out*/ size_t* num_symbols);
+
 std::vector<uint8_t> WriteDebugElfFileForClasses(
     InstructionSet isa,
     const InstructionSetFeatures* features,