Repository navigation
[BOLT][NFC] Unify perf data setting - #199322
Merged
Merged
Conversation
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
aaupov
marked this pull request as ready for review
May 23, 2026 05:08
aaupov
requested review from
ayermolo,
maksfb,
paschalis-mpeis,
rafaelauler,
yavtuk,
yota9 and
yozhu
as code owners
May 23, 2026 05:08
|
@llvm/pr-subscribers-bolt Author: Amir Ayupov (aaupov) ChangesCombine opts::PerfData handling into one place per driver (llvm-bolt and
Test Plan: NFC Full diff: https://github.com/llvm/llvm-project/pull/199322.diff 1 Files Affected:
diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp
index cf1b31f8c0c66..2cd5151bed49a 100644
--- a/bolt/tools/driver/llvm-bolt.cpp
+++ b/bolt/tools/driver/llvm-bolt.cpp
@@ -109,21 +109,10 @@ void perf2boltMode(int argc, char **argv) {
argc, argv,
"perf2bolt - BOLT data aggregator\n"
"\nEXAMPLE: perf2bolt -p=perf.data executable -o data.fdata\n");
- if (opts::PerfData.empty()) {
- errs() << ToolName << ": expected -perfdata=<filename> option.\n";
- exit(1);
- }
if (!opts::InputDataFilename.empty()) {
errs() << ToolName << ": unknown -data option.\n";
exit(1);
}
- if (!sys::fs::exists(opts::PerfData))
- report_error(opts::PerfData, errc::no_such_file_or_directory);
- if (!DataAggregator::checkPerfDataMagic(opts::PerfData)) {
- errs() << ToolName << ": '" << opts::PerfData
- << "': expected valid perf.data file.\n";
- exit(1);
- }
if (opts::OutputFilename.empty()) {
errs() << ToolName << ": expected -o=<output file> option.\n";
exit(1);
@@ -245,24 +234,16 @@ int main(int argc, char **argv) {
}
if (!opts::PerfData.empty()) {
- if (!opts::AggregateOnly) {
- errs() << ToolName
- << ": WARNING: reading perf data directly is unsupported, "
- "please use "
- "-aggregate-only or perf2bolt.\n!!! Proceed on your own "
- "risk. !!!\n";
- }
if (Error E = RI.setProfile(opts::PerfData))
report_error(opts::PerfData, std::move(E));
+ } else if (opts::AggregateOnly) {
+ errs() << ToolName << ": missing required -perfdata option.\n";
+ exit(1);
}
if (!opts::InputDataFilename.empty()) {
if (Error E = RI.setProfile(opts::InputDataFilename))
report_error(opts::InputDataFilename, std::move(E));
}
- if (opts::AggregateOnly && opts::PerfData.empty()) {
- errs() << ToolName << ": missing required -perfdata option.\n";
- exit(1);
- }
if (Error E = RI.run())
report_error(opts::InputFilename, std::move(E));
|
Created using spr 1.3.8-beta.1
aaupov
requested review from
Moxinilian,
Pierre-vh,
aaronmondal,
banach-space,
david-salinas,
dcaballe,
fabianmcg,
grypp,
keith,
lamb-j,
nicolasvasilache,
ritter-x2a,
rupprecht and
vangthao95
as code owners
May 27, 2026 07:21
aaupov
requested review from
a team,
JDevlieghere,
Jianhui-Li,
aartbik,
adam-smnk,
andykaylor,
bcardosolopes,
charithaintc,
lanza,
matthias-springer,
nikic and
xlauko
as code owners
May 27, 2026 07:21
Created using spr 1.3.8-beta.1
aaupov
changed the base branch from
users/aaupov/spr/main.boltnfc-unify-perf-data-setting
to
main
May 27, 2026 07:23
llvm-upstreamsync Bot
pushed a commit
to qualcomm/cpullvm-toolchain
that referenced
this pull request
May 27, 2026
Combine opts::PerfData handling into one place per driver (llvm-bolt and heatmap). * Allow using perf data directly after DataAggregator/DataReader unification in #195986. * Drop redundant perf data checks in perf2boltMode done by setProfile. Test Plan: NFC Reviewers: ritter-x2a, david-salinas, grypp, Pierre-vh, dcaballe, aartbik, adam-smnk, fabianmcg, yota9, JDevlieghere, banach-space, xlauko, nikic, #reviewers-libcxx, rafaelauler, Moxinilian, nicolasvasilache, yozhu, ayermolo, paschalis-mpeis, lamb-j, andykaylor, #reviewers-libc, vangthao95, bcardosolopes, yavtuk, aaronmondal, rupprecht, matthias-springer, keith, maksfb, lanza, Jianhui-Li, charithaintc Reviewed By: yozhu, rafaelauler Pull Request: llvm/llvm-project#199322
llvm-sync Bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
May 27, 2026
Combine opts::PerfData handling into one place per driver (llvm-bolt and heatmap). * Allow using perf data directly after DataAggregator/DataReader unification in #195986. * Drop redundant perf data checks in perf2boltMode done by setProfile. Test Plan: NFC Reviewers: ritter-x2a, david-salinas, grypp, Pierre-vh, dcaballe, aartbik, adam-smnk, fabianmcg, yota9, JDevlieghere, banach-space, xlauko, nikic, #reviewers-libcxx, rafaelauler, Moxinilian, nicolasvasilache, yozhu, ayermolo, paschalis-mpeis, lamb-j, andykaylor, #reviewers-libc, vangthao95, bcardosolopes, yavtuk, aaronmondal, rupprecht, matthias-springer, keith, maksfb, lanza, Jianhui-Li, charithaintc Reviewed By: yozhu, rafaelauler Pull Request: llvm/llvm-project#199322
aaupov
added a commit
that referenced
this pull request
Jun 1, 2026
Allow multiple -p/-perfdata args (comma-separated and repeated). Process them in parallel with `--perfdata-jobs/-pj` (default 4, 0 for all available hardware threads). Keep YAML/DataReader inputs single-profile only. This also enables density computation with multiple perf files. Prior to that, it was impossible to compute total density as it wasn't computed from symbolized profiles. Depends on #199323 #199322 #199321 #199320 Test Plan: Updated pre-aggregated-perf.test and perf_test For a large binary (300MB text) and 7 ETM perf data files (6GB each), compared to parallel perf2bolt + merge-fdata: * processing time is equal: 670+3s -> 669s (within noise), * output is equivalent: sorted fdata is equal. Reviewers: paschalis-mpeis, rafaelauler, yozhu, ayermolo, yavtuk, maksfb, yota9 Reviewed By: paschalis-mpeis, rafaelauler Pull Request: #199324
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combine opts::PerfData handling into one place per driver (llvm-bolt and
heatmap).
unification in [BOLT][NFCI] Drop CFG profile attachment in DataAggregator #195986.
Test Plan: NFC