diff options
author | Clement Courbet <courbet@google.com> | 2018-09-26 13:35:10 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-09-26 13:35:10 +0000 |
commit | 28d4f858243e404a08a905d6e764b74a6824d2d1 (patch) | |
tree | dfb1a10ce9ef5bfc6aa94b65936992a9df9a3bc9 /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | 6acaa18afcc888c5cf66bc9b17318eaf45ff4a91 (diff) | |
download | llvm-28d4f858243e404a08a905d6e764b74a6824d2d1.zip llvm-28d4f858243e404a08a905d6e764b74a6824d2d1.tar.gz llvm-28d4f858243e404a08a905d6e764b74a6824d2d1.tar.bz2 |
[llvm-exegesis] Get rid of debug_string.
Summary:
THis is a backwards-compatible change (existing files will work as
expected).
See PR39082.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D52546
llvm-svn: 343108
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 1748c53..a3dd56c 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -164,10 +164,13 @@ template <> struct SequenceElementTraits<exegesis::BenchmarkMeasure> { // e.g. { "key": "the key", "value": 0123 } template <> struct MappingTraits<exegesis::BenchmarkMeasure> { static void mapping(IO &Io, exegesis::BenchmarkMeasure &Obj) { - Io.mapOptional("debug_string", Obj.DebugString); + Io.mapRequired("key", Obj.Key); + if (!Io.outputting()) { + // For backward compatibility, interpret debug_string as a key. + Io.mapOptional("debug_string", Obj.Key); + } Io.mapRequired("value", Obj.PerInstructionValue); Io.mapOptional("per_snippet_value", Obj.PerSnippetValue); - Io.mapRequired("key", Obj.Key); } static const bool flow = true; }; |