Andres Freund
806dbe2dfa
perf c2c: Fix return type for histogram sorting comparision functions
...
commit c1c8013ec34d7163431d18367808ea40b2e305f8 upstream.
Commit 722ddfde366f ("perf tools: Fix time sorting") changed - correctly
so - hist_entry__sort to return int64. Unfortunately several of the
builtin-c2c.c comparison routines only happened to work due the cast
caused by the wrong return type.
This causes meaningless ordering of both the cacheline list, and the
cacheline details page. E.g a simple:
perf c2c record -a sleep 3
perf c2c report
will result in cacheline table like
=================================================
Shared Data Cache Line Table
=================================================
#
# ------- Cacheline ---------- Total Tot - LLC Load Hitm - - Store Reference - - Load Dram - LLC Total - Core Load Hit - - LLC Load Hit -
# Index Address Node PA cnt records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 L2 Llc Rmt
# ..... .............. .... ...... ....... ...... ..... ..... ... .... ..... ...... ...... .... ...... ..... ..... ..... ... .... .......
0 0x7f0d27ffba00 N/A 0 52 0.12% 13 6 7 12 12 0 0 7 14 40 4 16 0 0 0
1 0x7f0d27ff61c0 N/A 0 6353 14.04% 1475 801 674 779 779 0 0 718 1392 5574 1299 1967 0 115 0
2 0x7f0d26d3ec80 N/A 0 71 0.15% 16 4 12 13 13 0 0 12 24 58 1 20 0 9 0
3 0x7f0d26d3ec00 N/A 0 98 0.22% 23 17 6 19 19 0 0 6 12 79 0 40 0 10 0
i.e. with the list not being ordered by Total Hitm.
Fixes: 722ddfde366f ("perf tools: Fix time sorting")
Signed-off-by: Andres Freund <andres@anarazel.de>
Tested-by: Michael Petlan <mpetlan@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org # v3.16+
Link: http://lore.kernel.org/lkml/20200109043030.233746-1-andres@anarazel.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-05 14:18:12 +00:00
..
2017-11-02 11:10:55 +01:00
2018-08-15 18:13:01 +02:00
2018-08-24 13:09:17 +02:00
2019-01-13 10:01:02 +01:00
2017-11-02 11:10:55 +01:00
2019-12-01 09:13:12 +01:00
2019-09-10 10:32:17 +01:00
2019-07-31 07:28:53 +02:00
2019-04-27 09:35:41 +02:00
2018-10-10 08:54:20 +02:00
2019-01-13 10:01:02 +01:00
2019-01-13 10:01:02 +01:00
2020-01-12 12:11:50 +01:00
2018-06-21 04:02:49 +09:00
2017-11-02 11:10:55 +01:00
2019-12-31 12:37:45 +01:00
2019-11-24 08:23:34 +01:00
2017-11-02 11:10:55 +01:00
2020-02-05 14:18:12 +00:00
2019-12-31 12:36:54 +01:00
2019-01-13 10:01:02 +01:00
2019-01-13 10:01:02 +01:00
2020-01-27 14:46:29 +01:00
2018-05-30 07:52:28 +02:00
2019-12-01 09:14:29 +01:00
2019-01-13 10:01:01 +01:00
2019-01-13 10:01:02 +01:00
2017-11-02 11:10:55 +01:00