summaryrefslogtreecommitdiffstats
path: root/compiler/elf_writer_debug.cc
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-05-01 15:00:40 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-05-01 15:00:40 +0100
commit6d73c9d06bc0fc6b32825ca0a8224010933a026e (patch)
tree2601d0ae98704dc77e5b025b93dedae92ec2b821 /compiler/elf_writer_debug.cc
parent01ce498499eed47e87fceb8736d26fe49b2a4346 (diff)
downloadart-6d73c9d06bc0fc6b32825ca0a8224010933a026e.tar.gz
art-6d73c9d06bc0fc6b32825ca0a8224010933a026e.tar.bz2
art-6d73c9d06bc0fc6b32825ca0a8224010933a026e.zip
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
Diffstat (limited to 'compiler/elf_writer_debug.cc')
-rw-r--r--compiler/elf_writer_debug.cc12
1 files changed, 7 insertions, 5 deletions
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<uint8_t>* 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<uint8_t>* 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);
+ }
}
}