From 6d73c9d06bc0fc6b32825ca0a8224010933a026e Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Fri, 1 May 2015 15:00:40 +0100 Subject: Do not write CFI and symbols for deduplicate methods. There is no need to have multiple symbols for a given address since libunwind still has to pick only one to print. Likewise, there is no need to duplicate the CFI. There is fair number of duplicate methods in the boot image, so this saves over 20% from those debug sections. Change-Id: Ib4390150257d009a6303b084076750ce56afed60 --- compiler/elf_writer_debug.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'compiler/elf_writer_debug.cc') diff --git a/compiler/elf_writer_debug.cc b/compiler/elf_writer_debug.cc index 28e6999472..e8c3b6e432 100644 --- a/compiler/elf_writer_debug.cc +++ b/compiler/elf_writer_debug.cc @@ -170,11 +170,13 @@ void WriteEhFrame(const CompilerDriver* compiler, size_t cie_offset = eh_frame->size(); WriteEhFrameCIE(isa, address_type, eh_frame); for (const OatWriter::DebugInfo& mi : method_infos) { - const SwapVector* opcodes = mi.compiled_method_->GetCFIInfo(); - if (opcodes != nullptr) { - WriteEhFrameFDE(Is64BitInstructionSet(isa), cie_offset, - mi.low_pc_, mi.high_pc_ - mi.low_pc_, - opcodes, eh_frame, eh_frame_patches); + if (!mi.deduped_) { // Only one FDE per unique address. + const SwapVector* opcodes = mi.compiled_method_->GetCFIInfo(); + if (opcodes != nullptr) { + WriteEhFrameFDE(Is64BitInstructionSet(isa), cie_offset, + mi.low_pc_, mi.high_pc_ - mi.low_pc_, + opcodes, eh_frame, eh_frame_patches); + } } } -- cgit v1.2.3