diff options
author | Andi Kleen <ak@linux.intel.com> | 2013-10-01 07:22:15 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-04 10:06:06 +0200 |
commit | 354cc40e3b0981c38ba2ce2964954480e6c03c37 (patch) | |
tree | 49324485861fbf124babc19942a47d04bac35e10 /tools/perf/util/hist.c | |
parent | fafd883f671dfc1c2f62009179920f27abc784a1 (diff) | |
download | linux-354cc40e3b0981c38ba2ce2964954480e6c03c37.tar.gz linux-354cc40e3b0981c38ba2ce2964954480e6c03c37.tar.bz2 linux-354cc40e3b0981c38ba2ce2964954480e6c03c37.zip |
tools/perf: Fix sorting for 64bit entries
Some of the node comparisons in hist.c dropped the upper
32bit by using an int variable to store the compare
result. This broke various 64bit fields, causing
incorrect collapsing (found for the TSX transaction field)
Just use int64_t always.
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1380637335-30110-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 9ff6cf3e9a99..97dc2808885d 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -346,7 +346,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists, struct rb_node **p; struct rb_node *parent = NULL; struct hist_entry *he; - int cmp; + int64_t cmp; p = &hists->entries_in->rb_node; @@ -884,7 +884,7 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists, struct rb_node **p; struct rb_node *parent = NULL; struct hist_entry *he; - int cmp; + int64_t cmp; if (sort__need_collapse) root = &hists->entries_collapsed; |