]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix callgrind_annotate non deterministic order for equal total
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 27 Jan 2019 10:15:30 +0000 (11:15 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 27 Jan 2019 10:15:30 +0000 (11:15 +0100)
Patch by Matthias Schwarzott

NEWS
callgrind/callgrind_annotate.in

diff --git a/NEWS b/NEWS
index b69875efb5b04d62a849843d9266b80026cd1850..95970ce6d36b4cccb7bcd7167297a8bde3af40b0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,7 @@ where XXXXXX is the bug number as listed below.
 403552  s390x: wrong facility bit checked for vector facility
 
 n-i-bz  add syswrap for PTRACE_GET|SET_THREAD_AREA on amd64.
+n-i-bz  Fix callgrind_annotate non deterministic order for equal total
 
 Release 3.14.0 (9 October 2018)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index ebf81a0be902f259691a35982b024318b2e7ef17..1aa8e07b13179e221d1dcb3bf8a2e1d10c34d70e 100644 (file)
@@ -921,7 +921,7 @@ sub print_summary_and_fn_totals ()
 
     # Sort function names into order dictated by --sort option.
     @fn_fullnames = sort {
-        mycmp($fn_totals{$a}, $fn_totals{$b})
+        mycmp($fn_totals{$a}, $fn_totals{$b}) || $a cmp $b
     } @fn_fullnames;