[PATCH] D39943: [XRay] Stable sort XRayRecord to remove non-deterministic ordering

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 11 20:36:54 PST 2017


mgrang created this revision.

This fixes failure in tools/llvm-xray/X86/graph-zero-latency-calls.yaml
uncovered by https://reviews.llvm.org/D39245.


Repository:
  rL LLVM

https://reviews.llvm.org/D39943

Files:
  lib/XRay/Trace.cpp


Index: lib/XRay/Trace.cpp
===================================================================
--- lib/XRay/Trace.cpp
+++ lib/XRay/Trace.cpp
@@ -606,7 +606,7 @@
   }
 
   if (Sort)
-    llvm::sort(T.Records.begin(), T.Records.end(),
+    std::stable_sort(T.Records.begin(), T.Records.end(),
               [&](const XRayRecord &L, const XRayRecord &R) {
                 return L.TSC < R.TSC;
               });


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39943.122595.patch
Type: text/x-patch
Size: 411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171112/ad8b648f/attachment.bin>


More information about the llvm-commits mailing list