diff options
author | Alexander Yermolovich <ayermolo@fb.com> | 2023-01-27 15:49:01 -0800 |
---|---|---|
committer | Alexander Yermolovich <ayermolo@fb.com> | 2023-01-27 15:50:55 -0800 |
commit | 864133c5f95070e273cc6515e52c7a752fbfea30 (patch) | |
tree | b2947ff5dcd6498db9a270eb4d23f1f0759a479e | |
parent | edd80befeeb92000800ded2a6f3dcdfd672d95ea (diff) | |
download | llvm-864133c5f95070e273cc6515e52c7a752fbfea30.zip llvm-864133c5f95070e273cc6515e52c7a752fbfea30.tar.gz llvm-864133c5f95070e273cc6515e52c7a752fbfea30.tar.bz2 |
[BOLT][DWARF] Add logging for split dwarf
Added logging when bolt is processing binary with split dwarf.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D142576
-rw-r--r-- | bolt/lib/Core/BinaryContext.cpp | 2 | ||||
-rw-r--r-- | bolt/test/X86/dwarf-test-df-logging.test | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 02d9fc9..3fc79dd 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -1561,6 +1561,8 @@ void BinaryContext::preprocessDWODebugInfo() { DWOCUs[*DWOId] = DWOCU; } } + if (!DWOCUs.empty()) + outs() << "BOLT-INFO: processing split DWARF\n"; } void BinaryContext::preprocessDebugInfo() { diff --git a/bolt/test/X86/dwarf-test-df-logging.test b/bolt/test/X86/dwarf-test-df-logging.test new file mode 100644 index 0000000..ca5e578 --- /dev/null +++ b/bolt/test/X86/dwarf-test-df-logging.test @@ -0,0 +1,12 @@ +; Testing that we print out INFO message when binary has split dwarf. + +; RUN: mkdir -p %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 + +; BOLT: BOLT-INFO: processing split DWARF |