[PATCH] D142576: [BOLT][DWARF] Add logging for split dwarf

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 12:17:43 PST 2023


ayermolo created this revision.
Herald added subscribers: treapster, hoy, modimo, wenlei.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
ayermolo requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Added logging when bolt is processing binary with split dwarf.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142576

Files:
  bolt/lib/Core/BinaryContext.cpp
  bolt/test/X86/dwarf-test-df-logging.test


Index: bolt/test/X86/dwarf-test-df-logging.test
===================================================================
--- /dev/null
+++ bolt/test/X86/dwarf-test-df-logging.test
@@ -0,0 +1,13 @@
+; RUN: rm -rf %t
+; RUN: mkdir %t
+; RUN: cd %t
+; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-main.s \
+; RUN: -split-dwarf-file=main.dwo -o main.o
+; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-helper.s \
+; RUN: -split-dwarf-file=helper.dwo -o helper.o
+; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
+; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections | FileCheck -check-prefix=BOLT %s
+
+; Testing that we print out INFO message when binary has split dwarf.
+
+; BOLT: BOLT-INFO: Processing split DWARF
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -1561,6 +1561,8 @@
       DWOCUs[*DWOId] = DWOCU;
     }
   }
+  if (!DWOCUs.empty())
+    outs() << "BOLT-INFO: Processing split DWARF\n";
 }
 
 void BinaryContext::preprocessDebugInfo() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142576.492228.patch
Type: text/x-patch
Size: 1234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230125/7e0c513e/attachment.bin>


More information about the llvm-commits mailing list