[PATCH] D134819: [BOLT] Report BB reordering %-age vs profiled and total number of functions
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 03:36:00 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG90d87dbf4bbc: [BOLT] Report BB reordering %-age vs profiled and total number of functions (authored by Amir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134819/new/
https://reviews.llvm.org/D134819
Files:
bolt/include/bolt/Core/BinaryContext.h
bolt/lib/Passes/BinaryPasses.cpp
Index: bolt/lib/Passes/BinaryPasses.cpp
===================================================================
--- bolt/lib/Passes/BinaryPasses.cpp
+++ bolt/lib/Passes/BinaryPasses.cpp
@@ -417,10 +417,14 @@
ParallelUtilities::runOnEachFunction(
BC, ParallelUtilities::SchedulingPolicy::SP_BB_LINEAR, WorkFun, SkipFunc,
"ReorderBasicBlocks");
+ const size_t NumAllProfiledFunctions =
+ BC.NumProfiledFuncs + BC.NumStaleProfileFuncs;
outs() << "BOLT-INFO: basic block reordering modified layout of "
- << format("%zu (%.2lf%%) functions\n",
+ << format("%zu functions (%.2lf%% of profiled, %.2lf%% of total)\n",
ModifiedFuncCount.load(std::memory_order_relaxed),
+ 100.0 * ModifiedFuncCount.load(std::memory_order_relaxed) /
+ NumAllProfiledFunctions,
100.0 * ModifiedFuncCount.load(std::memory_order_relaxed) /
BC.getBinaryFunctions().size());
@@ -1383,6 +1387,7 @@
}
}
BC.NumProfiledFuncs = ProfiledFunctions.size();
+ BC.NumStaleProfileFuncs = NumStaleProfileFunctions;
const size_t NumAllProfiledFunctions =
ProfiledFunctions.size() + NumStaleProfileFunctions;
Index: bolt/include/bolt/Core/BinaryContext.h
===================================================================
--- bolt/include/bolt/Core/BinaryContext.h
+++ bolt/include/bolt/Core/BinaryContext.h
@@ -615,6 +615,9 @@
/// Number of functions with profile information
uint64_t NumProfiledFuncs{0};
+ /// Number of functions with stale profile information
+ uint64_t NumStaleProfileFuncs{0};
+
/// Number of objects in profile whose profile was ignored.
uint64_t NumUnusedProfiledObjects{0};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134819.463829.patch
Type: text/x-patch
Size: 1744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220929/05cf9319/attachment.bin>
More information about the llvm-commits
mailing list