[PATCH] D92816: [llvm-profgen][NFC] Fix test failure by making unwinder's output deterministic

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 22:24:49 PST 2020


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:202
 static void printSampleCounter(ContextRangeCounter &Counter) {
+  std::map<std::string, RangeSample> SortedCounter;
+  // Use sorted container to make the output deterministic
----------------
wenlei wrote:
> Does this work?
> 
> `std::map<std::string, RangeSample> OrderedCounter(Counter.begin(), Counter.end());`
Yeah, thanks for the suggestion!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92816/new/

https://reviews.llvm.org/D92816



More information about the llvm-commits mailing list