[all-commits] [llvm/llvm-project] 5a865b: [DWARF] Don't process .debug_info relocations for ...

Alexander Yermolovich via All-commits all-commits at lists.llvm.org
Mon Aug 2 10:42:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a865b0b1ee650bc4d9b96fea98a1daa8e5933b6
      https://github.com/llvm/llvm-project/commit/5a865b0b1ee650bc4d9b96fea98a1daa8e5933b6
  Author: Alexander Yermolovich <ayermolo at fb.com>
  Date:   2021-08-02 (Mon, 02 Aug 2021)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    A llvm/test/DebugInfo/X86/dwarfdump-rela-dwo.s
    M llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
    M llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
    M llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

  Log Message:
  -----------
  [DWARF] Don't process .debug_info relocations for DWO Context

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.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D106624




More information about the All-commits mailing list