Skip to content

Commit 6aad62c

Browse files
authored
[BOLT][DWARF] Add parallelization for processing of DWO debug information (llvm#100282)
Enables parallelization for the processing of DWO CUs.
1 parent 9428631 commit 6aad62c

File tree

47 files changed

+88
-62
lines changed

Some content is hidden

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

47 files changed

+88
-62
lines changed

bolt/docs/CommandLineArgumentReference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113

114114
Prints out offsets for abbrev and debug_info of Skeleton CUs that get patched.
115115

116+
- `--debug-thread-count=<uint>`
117+
118+
Specifies the number of threads to be used when processing DWO debug information.
119+
116120
- `--dot-tooltip-code`
117121

118122
Add basic block instructions as tool tips on nodes

bolt/include/bolt/Core/ParallelUtilities.h

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

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

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

bolt/include/bolt/Rewrite/DWARFRewriter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ class DWARFRewriter {
184184
/// Output .dwo files.
185185
void writeDWOFiles(DWARFUnit &, const OverriddenSectionsMap &,
186186
const std::string &, DebugLocWriter &,
187-
DebugStrOffsetsWriter &, DebugStrWriter &);
187+
DebugStrOffsetsWriter &, DebugStrWriter &,
188+
DebugRangesSectionWriter &);
188189
using KnownSectionsEntry = std::pair<MCSection *, DWARFSectionKind>;
189190
};
190191

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 unsigned 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: 31 additions & 14 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<unsigned>
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(""),
@@ -475,8 +481,8 @@ static void emitDWOBuilder(const std::string &DWOName,
475481
DWARFUnit &SplitCU, DWARFUnit &CU,
476482
DebugLocWriter &LocWriter,
477483
DebugStrOffsetsWriter &StrOffstsWriter,
478-
DebugStrWriter &StrWriter,
479-
GDBIndex &GDBIndexSection) {
484+
DebugStrWriter &StrWriter, GDBIndex &GDBIndexSection,
485+
DebugRangesSectionWriter &TempRangesSectionWriter) {
480486
// Populate debug_info and debug_abbrev for current dwo into StringRef.
481487
DWODIEBuilder.generateAbbrevs();
482488
DWODIEBuilder.finish();
@@ -532,7 +538,7 @@ static void emitDWOBuilder(const std::string &DWOName,
532538
OverriddenSections[Kind] = Contents;
533539
}
534540
Rewriter.writeDWOFiles(CU, OverriddenSections, DWOName, LocWriter,
535-
StrOffstsWriter, StrWriter);
541+
StrOffstsWriter, StrWriter, TempRangesSectionWriter);
536542
}
537543

538544
using DWARFUnitVec = std::vector<DWARFUnit *>;
@@ -646,7 +652,6 @@ void DWARFRewriter::updateDebugInfo() {
646652
*StrWriter);
647653
GDBIndex GDBIndexSection(BC);
648654
auto processSplitCU = [&](DWARFUnit &Unit, DWARFUnit &SplitCU,
649-
DIEBuilder &DIEBlder,
650655
DebugRangesSectionWriter &TempRangesSectionWriter,
651656
DebugAddrWriter &AddressWriter,
652657
const std::string &DWOName,
@@ -669,7 +674,7 @@ void DWARFRewriter::updateDebugInfo() {
669674

670675
emitDWOBuilder(DWOName, DWODIEBuilder, *this, SplitCU, Unit,
671676
DebugLocDWoWriter, DWOStrOffstsWriter, DWOStrWriter,
672-
GDBIndexSection);
677+
GDBIndexSection, TempRangesSectionWriter);
673678
};
674679
auto processMainBinaryCU = [&](DWARFUnit &Unit, DIEBuilder &DIEBlder) {
675680
std::optional<DWARFUnit *> SplitCU;
@@ -716,9 +721,13 @@ void DWARFRewriter::updateDebugInfo() {
716721
finalizeTypeSections(DIEBlder, *Streamer, GDBIndexSection);
717722

718723
CUPartitionVector PartVec = partitionCUs(*BC.DwCtx);
724+
const unsigned int ThreadCount =
725+
std::min(opts::DebugThreadCount, opts::ThreadCount);
719726
for (std::vector<DWARFUnit *> &Vec : PartVec) {
720727
DIEBlder.buildCompileUnits(Vec);
721728
llvm::SmallVector<std::unique_ptr<DIEBuilder>, 72> DWODIEBuildersByCU;
729+
ThreadPoolInterface &ThreadPool =
730+
ParallelUtilities::getThreadPool(ThreadCount);
722731
for (DWARFUnit *CU : DIEBlder.getProcessedCUs()) {
723732
createRangeLocListAddressWriters(*CU);
724733
std::optional<DWARFUnit *> SplitCU;
@@ -729,9 +738,9 @@ void DWARFRewriter::updateDebugInfo() {
729738
continue;
730739
DebugAddrWriter &AddressWriter =
731740
*AddressWritersByCU[CU->getOffset()].get();
732-
DebugRangesSectionWriter *TempRangesSectionWriter =
733-
CU->getVersion() >= 5 ? RangeListsWritersByCU[*DWOId].get()
734-
: LegacyRangesWritersByCU[*DWOId].get();
741+
DebugRangesSectionWriter &TempRangesSectionWriter =
742+
CU->getVersion() >= 5 ? *RangeListsWritersByCU[*DWOId].get()
743+
: *LegacyRangesWritersByCU[*DWOId].get();
735744
std::optional<std::string> DwarfOutputPath =
736745
opts::DwarfOutputPath.empty()
737746
? std::nullopt
@@ -744,9 +753,17 @@ void DWARFRewriter::updateDebugInfo() {
744753
*DWODIEBuildersByCU.emplace_back(std::move(DWODIEBuilderPtr)).get();
745754
if (CU->getVersion() >= 5)
746755
StrOffstsWriter->finalizeSection(*CU, DIEBlder);
747-
processSplitCU(*CU, **SplitCU, DIEBlder, *TempRangesSectionWriter,
748-
AddressWriter, DWOName, DwarfOutputPath, DWODIEBuilder);
756+
// Important to capture CU and SplitCU by value here, otherwise when the
757+
// thread is executed at some point after the current iteration of the
758+
// loop, dereferencing CU/SplitCU in the call to processSplitCU means it
759+
// will dereference a different variable than the one intended, causing a
760+
// seg fault.
761+
ThreadPool.async([&, DwarfOutputPath, DWOName, CU, SplitCU] {
762+
processSplitCU(*CU, **SplitCU, TempRangesSectionWriter, AddressWriter,
763+
DWOName, DwarfOutputPath, DWODIEBuilder);
764+
});
749765
}
766+
ThreadPool.wait();
750767
for (std::unique_ptr<DIEBuilder> &DWODIEBuilderPtr : DWODIEBuildersByCU)
751768
DWODIEBuilderPtr->updateDebugNamesTable();
752769
for (DWARFUnit *CU : DIEBlder.getProcessedCUs())
@@ -1807,7 +1824,8 @@ std::optional<StringRef> updateDebugData(
18071824
void DWARFRewriter::writeDWOFiles(
18081825
DWARFUnit &CU, const OverriddenSectionsMap &OverridenSections,
18091826
const std::string &DWOName, DebugLocWriter &LocWriter,
1810-
DebugStrOffsetsWriter &StrOffstsWriter, DebugStrWriter &StrWriter) {
1827+
DebugStrOffsetsWriter &StrOffstsWriter, DebugStrWriter &StrWriter,
1828+
DebugRangesSectionWriter &TempRangesSectionWriter) {
18111829
// Setup DWP code once.
18121830
DWARFContext *DWOCtx = BC.getDWOContext();
18131831
const uint64_t DWOId = *CU.getDWOId();
@@ -1854,9 +1872,8 @@ void DWARFRewriter::writeDWOFiles(
18541872

18551873
DebugRangeListsSectionWriter *RangeListssWriter = nullptr;
18561874
if (CU.getVersion() == 5) {
1857-
assert(RangeListsWritersByCU.count(DWOId) != 0 &&
1858-
"No RangeListsWriter for DWO ID.");
1859-
RangeListssWriter = RangeListsWritersByCU[DWOId].get();
1875+
RangeListssWriter =
1876+
llvm::dyn_cast<DebugRangeListsSectionWriter>(&TempRangesSectionWriter);
18601877

18611878
// Handling .debug_rnglists.dwo separately. The original .o/.dwo might not
18621879
// have .debug_rnglists so won't be part of the loop below.

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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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-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=4 --cu-processing-batch-size=4
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-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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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=4 --cu-processing-batch-size=4
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

0 commit comments

Comments
 (0)