mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-18 16:44:33 +00:00
perf tools: Fix time sorting
commit722ddfde36
upstream. The final sort might get confused when the comparison is done over bigger numbers than int like for -s time. Check the following report for longer workloads: $ perf report -s time -F time,overhead --stdio Fix hist_entry__sort() to properly return int64_t and not possible cut int. Fixes:043ca389a3
("perf tools: Use hpp formats to sort final output") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Reviewed-by: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.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/20191104232711.16055-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
66d53cd683
commit
f39fbd05f9
1 changed files with 1 additions and 1 deletions
|
@ -1508,7 +1508,7 @@ int hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int hist_entry__sort(struct hist_entry *a, struct hist_entry *b)
|
||||
static int64_t hist_entry__sort(struct hist_entry *a, struct hist_entry *b)
|
||||
{
|
||||
struct hists *hists = a->hists;
|
||||
struct perf_hpp_fmt *fmt;
|
||||
|
|
Loading…
Reference in a new issue