From a34cfacb5c178a8739952d7f7a67979fd34f76ef Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 8 Apr 2020 15:55:34 +0200 Subject: [PATCH] Stabilize symbol sorting. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 34ef6388..4d9079b4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11393,11 +11393,11 @@ void View::DrawStatistics() { if( m_statSelf ) { - pdqsort_branchless( data.begin(), data.end(), []( const auto& l, const auto& r ) { return l.excl > r.excl; } ); + pdqsort_branchless( data.begin(), data.end(), []( const auto& l, const auto& r ) { return l.excl != r.excl ? l.excl > r.excl : l.symAddr < r.symAddr; } ); } else { - pdqsort_branchless( data.begin(), data.end(), []( const auto& l, const auto& r ) { return l.incl > r.incl; } ); + pdqsort_branchless( data.begin(), data.end(), []( const auto& l, const auto& r ) { return l.incl != l.incl ? l.incl > r.incl : l.symAddr < r.symAddr; } ); } ImGui::BeginChild( "##statisticsSampling" );