Skip to content

Commit fff8055

Browse files
committed
[BOLT][DWARF][NFC] Add parallelization for processing of DWO debug information
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60151517
1 parent 1c1b8c2 commit fff8055

File tree

48 files changed

+66
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+66
-52
lines changed

bolt/include/bolt/Core/ParallelUtilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enum SchedulingPolicy {
5050
};
5151

5252
/// Return the managed thread pool and initialize it if not initialized.
53-
ThreadPoolInterface &getThreadPool();
53+
ThreadPoolInterface &getThreadPool(const int ThreadsCount = opts::ThreadCount);
5454

5555
/// Perform the work on each BinaryFunction except those that are accepted
5656
/// by SkipPredicate, scheduling heuristic is based on SchedPolicy.

bolt/lib/Core/ParallelUtilities.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace ParallelUtilities {
4949

5050
namespace {
5151
/// A single thread pool that is used to run parallel tasks
52-
std::unique_ptr<DefaultThreadPool> ThreadPoolPtr;
52+
std::unique_ptr<ThreadPoolInterface> ThreadPoolPtr;
5353

5454
unsigned computeCostFor(const BinaryFunction &BF,
5555
const PredicateTy &SkipPredicate,
@@ -102,12 +102,15 @@ inline unsigned estimateTotalCost(const BinaryContext &BC,
102102

103103
} // namespace
104104

105-
ThreadPoolInterface &getThreadPool() {
105+
ThreadPoolInterface &getThreadPool(const int ThreadsCount) {
106106
if (ThreadPoolPtr.get())
107107
return *ThreadPoolPtr;
108108

109-
ThreadPoolPtr = std::make_unique<DefaultThreadPool>(
110-
llvm::hardware_concurrency(opts::ThreadCount));
109+
if (ThreadsCount > 1)
110+
ThreadPoolPtr = std::make_unique<DefaultThreadPool>(
111+
llvm::hardware_concurrency(ThreadsCount));
112+
else
113+
ThreadPoolPtr = std::make_unique<SingleThreadExecutor>();
111114
return *ThreadPoolPtr;
112115
}
113116

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ static cl::opt<bool> KeepARanges(
329329
"keep or generate .debug_aranges section if .gdb_index is written"),
330330
cl::Hidden, cl::cat(BoltCategory));
331331

332+
static cl::opt<int>
333+
DebugThreadCount("debug-thread-count",
334+
cl::desc("specifies thread count for the multithreading "
335+
"for updating DWO debug info"),
336+
cl::init(1), cl::cat(BoltCategory));
337+
332338
static cl::opt<std::string> DwarfOutputPath(
333339
"dwarf-output-path",
334340
cl::desc("Path to where .dwo files will be written out to."), cl::init(""),
@@ -719,6 +725,8 @@ void DWARFRewriter::updateDebugInfo() {
719725
for (std::vector<DWARFUnit *> &Vec : PartVec) {
720726
DIEBlder.buildCompileUnits(Vec);
721727
llvm::SmallVector<std::unique_ptr<DIEBuilder>, 72> DWODIEBuildersByCU;
728+
ThreadPoolInterface &ThreadPool =
729+
ParallelUtilities::getThreadPool(opts::DebugThreadCount);
722730
for (DWARFUnit *CU : DIEBlder.getProcessedCUs()) {
723731
createRangeLocListAddressWriters(*CU);
724732
std::optional<DWARFUnit *> SplitCU;
@@ -744,9 +752,12 @@ void DWARFRewriter::updateDebugInfo() {
744752
*DWODIEBuildersByCU.emplace_back(std::move(DWODIEBuilderPtr)).get();
745753
if (CU->getVersion() >= 5)
746754
StrOffstsWriter->finalizeSection(*CU, DIEBlder);
747-
processSplitCU(*CU, **SplitCU, DIEBlder, *TempRangesSectionWriter,
748-
AddressWriter, DWOName, DwarfOutputPath, DWODIEBuilder);
755+
ThreadPool.async([&, DwarfOutputPath, DWOName] {
756+
processSplitCU(*CU, **SplitCU, DIEBlder, *TempRangesSectionWriter,
757+
AddressWriter, DWOName, DwarfOutputPath, DWODIEBuilder);
758+
});
749759
}
760+
ThreadPool.wait();
750761
for (std::unique_ptr<DIEBuilder> &DWODIEBuilderPtr : DWODIEBuildersByCU)
751762
DWODIEBuilderPtr->updateDebugNamesTable();
752763
for (DWARFUnit *CU : DIEBlder.getProcessedCUs())

bolt/test/X86/dwarf4-cross-cu-backward-different-abbrev.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-cross-reference-different-abbrev-dst.s -o %t.o
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-cross-reference-different-abbrev-src.s -o %t1.o
55
# RUN: %clang %cflags -gdwarf-4 %t.o %t1.o -o %t.exe
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
99

bolt/test/X86/dwarf4-cross-cu-forward-different-abbrev.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-cross-reference-different-abbrev-dst.s -o %t.o
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-cross-reference-different-abbrev-src.s -o %t1.o
55
# RUN: %clang %cflags -gdwarf-4 %t1.o %t.o -o %t.exe
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
99

bolt/test/X86/dwarf4-cross-cu-loclist-dwarf4-loclist--dwarf5-loclist.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loclist.s -o %t1.o
55
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-two-entries-loclist.s -o %t2.o
66
# RUN: %clang %cflags %t1.o %t2.o %t.o -o %t.exe
7-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
7+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
99
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
1010

bolt/test/X86/dwarf4-df-dualcu-loclist.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-loclist-helper.s \
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -O2 -gsplit-dwarf=split main.o helper.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-MAIN %s
1111
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-MAIN %s
1212
; RUN: llvm-dwarfdump --show-form --verbose --debug-info helper.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-HELPER %s

bolt/test/X86/dwarf4-df-dualcu.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-dualcu-helper.s \
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe -fno-pic -no-pie
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --always-convert-to-ranges
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --always-convert-to-ranges --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s
1111
; RUN: llvm-dwarfdump --show-form --verbose --debug-ranges main.exe.bolt &> %t/foo.txt
1212
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt

bolt/test/X86/dwarf4-df-input-lowpc-ranges-cus.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-input-lowpc-ranges-other.s \
77
; RUN: -split-dwarf-file=mainOther.dwo -o other.o
88
; RUN: %clang %cflags -gdwarf-4 -gsplit-dwarf=split main.o other.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-ranges main.exe.bolt &> %t/foo.txt
1111
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt
1212
; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s

bolt/test/X86/dwarf4-split-dwarf-no-address.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc --split-dwarf-file=helper.dwo --triple=x86_64-unknown-linux-gnu \
77
; RUN: --filetype=obj %p/Inputs/dwarf4-split-dwarf-no-address-helper.s -o=helper.o
88
; RUN: %clang %cflags -gdwarf-4 -gsplit-dwarf=split main.o helper.o -o main.exe -fno-pic -no-pie
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt | FileCheck -check-prefix=BOLT %s
1111

1212
;; Testing that there are no asserts/crashes when one of the DWARF4 CUs does not modify .debug_addr

bolt/test/X86/dwarf4-split-gdb-index-types-gdb-generated.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# RUN: llvm-mc --split-dwarf-file=helper.dwo -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-split-gdb-index-types-helper.s -o helpergdb.o
88
# RUN: %clang %cflags maingdb.o helpergdb.o -o maingdb.exe -Wl,-q
99
# RUN: llvm-objcopy maingdb.exe --add-section=.gdb_index=%p/Inputs/dwarf4-split-gdb-index-types-v8.gdb-index
10-
# RUN: llvm-bolt maingdb.exe -o maingdb.exe.bolt --update-debug-sections
10+
# RUN: llvm-bolt maingdb.exe -o maingdb.exe.bolt --update-debug-sections --debug-thread-count=72
1111
# RUN: llvm-dwarfdump --gdb-index maingdb.exe.bolt | FileCheck --check-prefix=POSTCHECK %s
1212

1313
## Tests that BOLT correctly handles gdb-index generated by GDB with split-dwarf DWARF4.

bolt/test/X86/dwarf4-subprogram-multiple-ranges-cus.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-subprogram-multiple-ranges-main.s -o %t1.o
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-subprogram-multiple-ranges-other.s -o %t2.o
55
# RUN: %clang %cflags %t1.o %t2.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-objdump %t.bolt --disassemble > %t1.txt
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t1.txt
99
# RUN: cat %t1.txt | FileCheck --check-prefix=POSTCHECK %s

bolt/test/X86/dwarf4-types-dwarf5-types.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-main.s -o %tmain.o
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-helper.s -o %thelper.o
55
# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s
99

bolt/test/X86/dwarf4-types-dwarf5.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-main.s -o %tmain.o
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-helper.s -o %thelper.o
55
# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s
99

bolt/test/X86/dwarf5-addr-section-reuse.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-helper2-addr-section-reuse.s -o %thelper2.o
44
# RUN: %clang %cflags -dwarf-5 %thelper1.o %tmain.o %thelper2.o -o %t.exe -Wl,-q
55
# RUN: llvm-dwarfdump --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
6-
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --debug-info %t.exe.bolt | FileCheck --check-prefix=POSTCHECK %s
88

99
## This test checks that when a binary is bolted if CU is not modified and has DW_AT_addr_base that is shared

bolt/test/X86/dwarf5-call-pc-function-null-check.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-function-null-check-main.s -o %tmain.o
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-function-null-check-helper.s -o %thelper.o
55
# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe > %t.txt
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe.bolt >> %t.txt
99
# RUN: cat %t.txt | FileCheck --check-prefix=CHECK %s

bolt/test/X86/dwarf5-call-pc.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-main.s -o %tmain.o
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-helper.s -o %thelper.o
55
# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections -reorder-blocks=reverse
6+
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections -reorder-blocks=reverse --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe > %tmain.txt
88
# RUN: llvm-objdump %t.exe --disassemble >> %tmain.txt
99
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe.bolt > %tmainbolt.txt

bolt/test/X86/dwarf5-cu-no-debug-addr.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-cu-no-debug-addr-main.s -o %t1main.o
44
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-cu-no-debug-addr-helper.s -o %t1helper.o
55
# RUN: %clang %cflags -dwarf-5 %t1main.o %t1helper.o -o %t.exe -Wl,-q
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
88
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
99

bolt/test/X86/dwarf5-df-input-lowpc-ranges-cus.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-input-lowpc-ranges-other.s \
77
; RUN: -split-dwarf-file=mainOther.dwo -o other.o
88
; RUN: %clang %cflags main.o other.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-rnglists main.exe.bolt &> %t/foo.txt
1111
; RUN: llvm-dwarfdump --show-form --verbose --debug-addr main.exe.bolt >> %t/foo.txt
1212
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt

bolt/test/X86/dwarf5-df-mono-dualcu.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
; RUN: -split-dwarf-file=main.dwo -o main.o
66
; RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux-gnu %p/Inputs/dwarf5-df-mono-helper.s -o=helper.o
77
; RUN: %clang %cflags -gdwarf-5 main.o helper.o -o main.exe -fno-pic -no-pie
8-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --always-convert-to-ranges
8+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --always-convert-to-ranges --debug-thread-count=72
99
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s
1010
; RUN: llvm-dwarfdump --show-form --verbose --debug-addr main.exe.bolt &> %t/foo.txt
1111
; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt

bolt/test/X86/dwarf5-df-output-dir-same-name.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-output-dir-same-name-helper.s \
1010
; RUN: -split-dwarf-file=objects/o2/split.dwo -o helper.o
1111
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
12-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --dwarf-output-path=%t/dwo
12+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --dwarf-output-path=%t/dwo --debug-thread-count=72
1313
; RUN: ls -l %t/dwo > log
1414
; RUN: llvm-dwarfdump --debug-info main.exe.bolt >> log
1515
; RUN: cat log | FileCheck -check-prefix=BOLT %s

bolt/test/X86/dwarf5-df-types-debug-names.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-types-debug-names-helper.s \
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --debug-info -r 0 main.dwo.dwo > log.txt
1111
; RUN: llvm-dwarfdump --debug-info -r 0 helper.dwo.dwo >> log.txt
1212
; RUN: llvm-dwarfdump --debug-info --debug-names main.exe.bolt >> log.txt

bolt/test/X86/dwarf5-df-types-dup-dwp-input.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
99
; RUN: llvm-dwp -e main.exe -o main.exe.dwp
10-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
10+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1111
; RUN: llvm-dwarfdump --debug-info -r 0 main.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-DWO-MAIN %s
1212
; RUN: llvm-dwarfdump --debug-info -r 0 helper.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-DWO-HELPER %s
1313

bolt/test/X86/dwarf5-df-types-modify-dwo-name-mixed.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-types-dup-helper.s \
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --debug-info -r 0 main.exe.bolt > log.txt
1111
; RUN: llvm-dwarfdump --debug-info -r 0 main.dwo.dwo >> log.txt
1212
; RUN: llvm-dwarfdump --debug-info -r 0 helper.dwo.dwo >> log.txt

bolt/test/X86/dwarf5-df-types-modify-dwo-name.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-types-debug-names-helper.s \
77
; RUN: -split-dwarf-file=helper.dwo -o helper.o
88
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
9-
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
9+
; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --debug-thread-count=72
1010
; RUN: llvm-dwarfdump --debug-info -r 0 main.exe.bolt > log.txt
1111
; RUN: llvm-dwarfdump --debug-info -r 0 main.dwo.dwo >> log.txt
1212
; RUN: llvm-dwarfdump --debug-info -r 0 helper.dwo.dwo >> log.txt

bolt/test/X86/dwarf5-dwarf4-gdb-index-types-gdb-generated-gdb11.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-gdb-index-types-helper.s -o %thelpergdb.o
55
# RUN: %clang %cflags %tmaingdb.o %thelpergdb.o -o %tgdb.exe -Wl,-q
66
# RUN: llvm-objcopy %tgdb.exe --add-section=.gdb_index=%p/Inputs/dwarf5-dwarf4-gdb-index-types-v8.generted-gdb11.gdb-index
7-
# RUN: llvm-bolt %tgdb.exe -o %tgdb.bolt --update-debug-sections
7+
# RUN: llvm-bolt %tgdb.exe -o %tgdb.bolt --update-debug-sections --debug-thread-count=72
88
# RUN: llvm-dwarfdump --gdb-index %tgdb.bolt | FileCheck --check-prefix=POSTCHECK %s
99

1010
## Tests that BOLT correctly handles gdb-index generated by GDB.

bolt/test/X86/dwarf5-dwarf4-gdb-index-types-gdb-generated-gdb9.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-gdb-index-types-helper.s -o %thelpergdb.o
55
# RUN: %clang %cflags %tmaingdb.o %thelpergdb.o -o %tgdb.exe -Wl,-q
66
# RUN: llvm-objcopy %tgdb.exe --add-section=.gdb_index=%p/Inputs/dwarf5-dwarf4-gdb-index-types-v8.generted-gdb9.gdb-index
7-
# RUN: llvm-bolt %tgdb.exe -o %tgdb.bolt --update-debug-sections
7+
# RUN: llvm-bolt %tgdb.exe -o %tgdb.bolt --update-debug-sections --debug-thread-count=72
88
# RUN: llvm-dwarfdump --gdb-index %tgdb.bolt | FileCheck --check-prefix=POSTCHECK %s
99

1010
## Tests that BOLT correctly handles gdb-index generated by GDB.

bolt/test/X86/dwarf5-dwarf4-gdb-index-types-lld-generated.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-gdb-index-types-main.s -o %tmain.o
44
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-gdb-index-types-helper.s -o %thelper.o
55
# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q -Wl,--gdb-index
6-
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6+
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=72
77
# RUN: llvm-dwarfdump --gdb-index %t.bolt | FileCheck --check-prefix=POSTCHECK %s
88

99
## Tests that BOLT correctly handles gdb-index generated by LLD.

0 commit comments

Comments
 (0)