summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-exegesis/lib/Latency.cpp2
-rw-r--r--llvm/tools/llvm-exegesis/lib/PerfHelper.h3
-rw-r--r--llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Latency.cpp b/llvm/tools/llvm-exegesis/lib/Latency.cpp
index b28b81cc940..770b928112e 100644
--- a/llvm/tools/llvm-exegesis/lib/Latency.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Latency.cpp
@@ -89,7 +89,7 @@ LatencyBenchmarkRunner::runMeasurements(const LLVMState &State,
if (Value < MinLatency)
MinLatency = Value;
}
- return {{"latency", static_cast<double>(MinLatency) / NumRepetitions}};
+ return {{"latency", static_cast<double>(MinLatency) / NumRepetitions, ""}};
}
} // namespace exegesis
diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.h b/llvm/tools/llvm-exegesis/lib/PerfHelper.h
index 22da2061c52..8c3f13e6c5c 100644
--- a/llvm/tools/llvm-exegesis/lib/PerfHelper.h
+++ b/llvm/tools/llvm-exegesis/lib/PerfHelper.h
@@ -17,6 +17,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Config/config.h"
#include <functional>
#include <memory>
@@ -76,7 +77,9 @@ struct Counter {
int64_t read() const; // Return the current value of the counter.
private:
+#ifdef HAVE_LIBPFM
int FileDescriptor = -1;
+#endif
};
// Helper to measure a list of PerfEvent for a particular function.
diff --git a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp
index 577b956f68d..5b3277dc7e2 100644
--- a/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp
@@ -31,7 +31,7 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) {
ToDisk.LLVMTriple = "llvm_triple";
ToDisk.NumRepetitions = 1;
ToDisk.Measurements.push_back(BenchmarkMeasure{"a", 1, "debug a"});
- ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2});
+ ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2, ""});
ToDisk.Error = "error";
const llvm::StringRef Filename("data.yaml");
OpenPOWER on IntegriCloud