[PATCH] D106624: [WIP][DWARF] Don't process .debug_info relocations for DWO Context

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 18:05:34 PDT 2021


ayermolo created this revision.
Herald added subscribers: hoy, modimo, wenlei, cmtice, rupprecht, hiraditya.
Herald added a reviewer: jhenderson.
ayermolo requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

When we build with split dwarf in single mode the .o files that contain both "normal" debug sections and dwo sections, along with relocaiton sections for "normal" debug sections.
When we create DWARF context in DWARFObjInMemory we process relocations and store them in the map for .debug_info, etc section.
For DWO Context we also do it for non dwo dwarf sections. Which I believe is not necessary. This leads to a lot of memory being wasted. We observed 70GB extra memory being used.

I went with context sensitive approach, flag is passed in. I am not sure if it's always safe not to process relocations for regular debug sections if Obj contains .dwo sections.
If it is alternatvie might be just to scan, in constructor, sections and if there are .dwo sections not to process regular debug ones.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106624

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106624.361051.patch
Type: text/x-patch
Size: 5084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210723/54badcb9/attachment.bin>


More information about the llvm-commits mailing list