mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 19:26:30 +00:00
[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
0815515b98
commit
21f84e5d5d
@ -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…
x
Reference in New Issue
Block a user