[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 22:34:36 PST 2017


mgrang updated this revision to Diff 122597.

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)
-    std::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.122597.patch
Type: text/x-patch
Size: 410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171112/a95b4bbe/attachment.bin>


More information about the llvm-commits mailing list