aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2024-01-23 00:06:46 -0800
committerGitHub <noreply@github.com>2024-01-23 00:06:46 -0800
commit7da76958390a43b2fd1db506c90970aeae4367eb (patch)
tree3d998bd0cfce794aad0a41cc5fe9e185de4ca1e8 /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
parent3ea92ea2f9d236569f82825cdba6d59bcc22495c (diff)
downloadllvm-7da76958390a43b2fd1db506c90970aeae4367eb.zip
llvm-7da76958390a43b2fd1db506c90970aeae4367eb.tar.gz
llvm-7da76958390a43b2fd1db506c90970aeae4367eb.tar.bz2
[llvm-exegesis] Add additional validation counters (#76788)
This patch adds support for additional types of validation counters and also adds mappings between these new validation counter types and physical counters on the hardware for microarchitectures that I have the ability to test on.
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index 969d9c1..e985c32 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -197,6 +197,18 @@ const char *validationEventToString(exegesis::ValidationEvent VE) {
switch (VE) {
case exegesis::ValidationEvent::InstructionRetired:
return "instructions-retired";
+ case exegesis::ValidationEvent::L1DCacheLoadMiss:
+ return "l1d-cache-load-misses";
+ case exegesis::ValidationEvent::L1DCacheStoreMiss:
+ return "l1d-cache-store-misses";
+ case exegesis::ValidationEvent::L1ICacheLoadMiss:
+ return "l1i-cache-load-misses";
+ case exegesis::ValidationEvent::DataTLBLoadMiss:
+ return "data-tlb-load-misses";
+ case exegesis::ValidationEvent::DataTLBStoreMiss:
+ return "data-tlb-store-misses";
+ case exegesis::ValidationEvent::InstructionTLBLoadMiss:
+ return "instruction-tlb-load-misses";
}
llvm_unreachable("Unhandled exegesis::ValidationEvent enum");
}
@@ -204,6 +216,18 @@ const char *validationEventToString(exegesis::ValidationEvent VE) {
Expected<exegesis::ValidationEvent> stringToValidationEvent(StringRef Input) {
if (Input == "instructions-retired")
return exegesis::ValidationEvent::InstructionRetired;
+ else if (Input == "l1d-cache-load-misses")
+ return exegesis::ValidationEvent::L1DCacheLoadMiss;
+ else if (Input == "l1d-cache-store-misses")
+ return exegesis::ValidationEvent::L1DCacheStoreMiss;
+ else if (Input == "l1i-cache-load-misses")
+ return exegesis::ValidationEvent::L1ICacheLoadMiss;
+ else if (Input == "data-tlb-load-misses")
+ return exegesis::ValidationEvent::DataTLBLoadMiss;
+ else if (Input == "data-tlb-store-misses")
+ return exegesis::ValidationEvent::DataTLBStoreMiss;
+ else if (Input == "instruction-tlb-load-misses")
+ return exegesis::ValidationEvent::InstructionTLBLoadMiss;
else
return make_error<StringError>("Invalid validation event string",
errc::invalid_argument);