forked from OSchip/llvm-project
[XRay] Stable sort XRayRecord to remove non-deterministic ordering
Summary: This fixes failure in tools/llvm-xray/X86/graph-zero-latency-calls.yaml uncovered by D39245. Reviewers: dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39943 llvm-svn: 318163
This commit is contained in:
parent
a7be3aa785
commit
28f3d5cb3e
|
@ -606,7 +606,7 @@ Expected<Trace> llvm::xray::loadTraceFile(StringRef Filename, bool Sort) {
|
|||
}
|
||||
|
||||
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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue