]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
perf tools: Fix time sorting
authorJiri Olsa <jolsa@kernel.org>
Mon, 4 Nov 2019 23:27:11 +0000 (00:27 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:06 +0000 (13:16 +0100)
commitd2c64a8d9390483a3d63e327bfe7e1deff46418c
tree6f555c66e4c0c421fca6ed3460a93161bcee9902
parent30ddfabf5e45aedcaf408ca4c4a9c608a57758b8
perf tools: Fix time sorting

BugLink: https://bugs.launchpad.net/bugs/1853519
commit 722ddfde366fd46205456a9c5ff9b3359dc9a75e 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: 043ca389a318 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/perf/util/hist.c