[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
Tue Nov 14 10:11:41 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL318163: [XRay] Stable sort XRayRecord to remove non-deterministic ordering (authored by mgrang).

Changed prior to commit:
  https://reviews.llvm.org/D39943?vs=122597&id=122867#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39943

Files:
  llvm/trunk/lib/XRay/Trace.cpp


Index: llvm/trunk/lib/XRay/Trace.cpp
===================================================================
--- llvm/trunk/lib/XRay/Trace.cpp
+++ llvm/trunk/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.122867.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/d6574950/attachment.bin>


More information about the llvm-commits mailing list