Skip to content

Commit 4369c4a

Browse files
Merge branch 'main' into tuple-no-__reference_binds_to_temporary
2 parents 4bfddda + dfaa662 commit 4369c4a

File tree

1,066 files changed

+109917
-45549
lines changed

Some content is hidden

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

1,066 files changed

+109917
-45549
lines changed

.ci/metrics/metrics.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -349,19 +349,7 @@ def github_get_metrics(
349349
running_count[metric_name] += 1
350350
continue
351351

352-
job_result = int(job.conclusion == "success")
353-
if job_result:
354-
# We still might want to mark the job as a failure if one of the steps
355-
# failed. This is required due to use setting continue-on-error in
356-
# the premerge pipeline to prevent sending emails while we are
357-
# testing the infrastructure.
358-
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
359-
# longer in a testing state and we can directly assert the workflow
360-
# result.
361-
for step in job.steps:
362-
if step.conclusion != "success" and step.conclusion != "skipped":
363-
job_result = 0
364-
break
352+
job_result = int(job.conclusion == "success" or job.conclusion == "skipped")
365353

366354
created_at = job.created_at
367355
started_at = job.started_at

.ci/monolithic-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function at-exit {
3838

3939
ccache --print-stats > artifacts/ccache_stats.txt
4040
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
41+
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
4142

4243
# If building fails there will be no results files.
4344
shopt -s nullglob

.ci/monolithic-windows.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function at-exit {
3333
mkdir -p artifacts
3434
sccache --show-stats >> artifacts/sccache_stats.txt
3535
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
36+
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
3637

3738
# If building fails there will be no results files.
3839
shopt -s nullglob

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
/mlir/**/Transforms/SROA.* @moxinilian
129129

130130
# BOLT
131-
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9
131+
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9 @paschalis-mpeis
132132

133133
# Bazel build system.
134134
/utils/bazel/ @rupprecht @keith @aaronmondal

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ jobs:
184184
**/crash_diagnostics/*
185185
186186
macos:
187-
needs: [ stage3 ]
187+
needs: [ stage2 ]
188188
strategy:
189189
fail-fast: false
190190
matrix:

bolt/Maintainers.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ N: Vladislav Khmelevsky
2020
2121
D: AArch64 backend
2222

23+
N: Paschalis Mpeis
24+
25+
D: AArch64 backend
26+
2327
N: Job Noorman
2428
2529
D: RISC-V backend

bolt/docs/Heatmaps.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ For the generation, the default bucket size was used with a line size of 128.
8989
Some useful options are:
9090

9191
```
92-
-line-size=<uint> - number of entries per line (default 256)
92+
-line-size=<uint> - number of entries per line (default 256).
93+
Use a smaller value (e.g. 128) if the heatmap doesn't fit
94+
the screen horizontally.
95+
-block-size=<initial size>[,<zoom-out size>,...] - heatmap bucket size,
96+
optionally followed by zoom-out sizes to produce coarse-
97+
grained heatmaps. Size can be specified in human-readable
98+
format with [kKmMgG][i][B] suffix. Default 64B, 4K, 256K.
9399
-max-address=<uint> - maximum address considered valid for heatmap (default 4GB)
94100
-print-mappings - print mappings in the legend, between characters/blocks and text sections (default false)
95101
```

bolt/include/bolt/Profile/Heatmap.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class Heatmap {
8585
void printSectionHotness(raw_ostream &OS) const;
8686

8787
size_t size() const { return Map.size(); }
88+
89+
/// Increase bucket size to \p NewSize, recomputing the heatmap.
90+
void resizeBucket(uint64_t NewSize);
8891
};
8992

9093
} // namespace bolt

bolt/include/bolt/Utils/CommandLineOpts.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ enum HeatmapModeKind {
2323
HM_Optional // perf2bolt --heatmap
2424
};
2525

26+
using HeatmapBlockSizes = std::vector<unsigned>;
27+
struct HeatmapBlockSpecParser : public llvm::cl::parser<HeatmapBlockSizes> {
28+
explicit HeatmapBlockSpecParser(llvm::cl::Option &O)
29+
: llvm::cl::parser<HeatmapBlockSizes>(O) {}
30+
// Return true on error.
31+
bool parse(llvm::cl::Option &O, llvm::StringRef ArgName, llvm::StringRef Arg,
32+
HeatmapBlockSizes &Val);
33+
};
34+
2635
extern HeatmapModeKind HeatmapMode;
2736
extern bool BinaryAnalysisMode;
2837

@@ -47,7 +56,8 @@ extern llvm::cl::opt<bool> EqualizeBBCounts;
4756
extern llvm::cl::opt<bool> ForcePatch;
4857
extern llvm::cl::opt<bool> RemoveSymtab;
4958
extern llvm::cl::opt<unsigned> ExecutionCountThreshold;
50-
extern llvm::cl::opt<unsigned> HeatmapBlock;
59+
extern llvm::cl::opt<HeatmapBlockSizes, false, HeatmapBlockSpecParser>
60+
HeatmapBlock;
5161
extern llvm::cl::opt<unsigned long long> HeatmapMaxAddress;
5262
extern llvm::cl::opt<unsigned long long> HeatmapMinAddress;
5363
extern llvm::cl::opt<bool> HeatmapPrintMappings;

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ std::error_code DataAggregator::printLBRHeatMap() {
13141314
opts::HeatmapMaxAddress = 0xffffffffffffffff;
13151315
opts::HeatmapMinAddress = KernelBaseAddr;
13161316
}
1317-
Heatmap HM(opts::HeatmapBlock, opts::HeatmapMinAddress,
1318-
opts::HeatmapMaxAddress, getTextSections(BC));
1317+
opts::HeatmapBlockSizes &HMBS = opts::HeatmapBlock;
1318+
Heatmap HM(HMBS[0], opts::HeatmapMinAddress, opts::HeatmapMaxAddress,
1319+
getTextSections(BC));
13191320
auto getSymbolValue = [&](const MCSymbol *Symbol) -> uint64_t {
13201321
if (Symbol)
13211322
if (ErrorOr<uint64_t> SymValue = BC->getSymbolValue(*Symbol))
@@ -1365,6 +1366,14 @@ std::error_code DataAggregator::printLBRHeatMap() {
13651366
HM.printCDF(opts::HeatmapOutput + ".csv");
13661367
HM.printSectionHotness(opts::HeatmapOutput + "-section-hotness.csv");
13671368
}
1369+
// Provide coarse-grained heatmaps if requested via zoom-out scales
1370+
for (const uint64_t NewBucketSize : ArrayRef(HMBS).drop_front()) {
1371+
HM.resizeBucket(NewBucketSize);
1372+
if (opts::HeatmapOutput == "-")
1373+
HM.print(opts::HeatmapOutput);
1374+
else
1375+
HM.print(formatv("{0}-{1}", opts::HeatmapOutput, NewBucketSize).str());
1376+
}
13681377

13691378
return std::error_code();
13701379
}

0 commit comments

Comments
 (0)