[llvm] [llvm-exegesis] Add debug option to print per-measurement values (PR #81219)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 19:28:32 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff c560ce464ae486e86e3d2d9684df3f714317f502 89aee78a9c7819edb12e14a7414ab33515dbe9b0 -- llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp llvm/tools/llvm-exegesis/lib/BenchmarkResult.h llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index 0d6317f060..8aace51161 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -193,12 +193,12 @@ template <> struct SequenceElementTraits<exegesis::BenchmarkMeasure> {
static const bool flow = false;
};
-
template <>
struct CustomMappingTraits<std::map<exegesis::ValidationEvent, int64_t>> {
static void inputOne(IO &Io, StringRef KeyStr,
std::map<exegesis::ValidationEvent, int64_t> &VI) {
- Expected<exegesis::ValidationEvent> Key = exegesis::stringToValidationEvent(KeyStr);
+ Expected<exegesis::ValidationEvent> Key =
+ exegesis::stringToValidationEvent(KeyStr);
if (!Key) {
Io.setError("Key is not a valid validation event");
return;
diff --git a/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
index cb1cd426e9..a9917a29cc 100644
--- a/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
@@ -94,7 +94,8 @@ Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
return ExpectedCounterValues.takeError();
ValuesCount = ExpectedCounterValues.get().size();
if (ValuesCount == 1) {
- LLVM_DEBUG(dbgs() << "Latency value: " << ExpectedCounterValues.get()[0] << "\n");
+ LLVM_DEBUG(dbgs() << "Latency value: " << ExpectedCounterValues.get()[0]
+ << "\n");
AccumulatedValues.push_back(ExpectedCounterValues.get()[0]);
} else {
// We'll keep the reading with lowest variance (ie., most stable)
``````````
</details>
https://github.com/llvm/llvm-project/pull/81219
More information about the llvm-commits
mailing list