perf c2c: Fix return type for histogram sorting comparision functions
[linux-2.6-microblaze.git] / tools / perf / builtin-c2c.c
index e69f449..246ac0b 100644 (file)
@@ -595,8 +595,8 @@ tot_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
 {
        struct c2c_hist_entry *c2c_left;
        struct c2c_hist_entry *c2c_right;
-       unsigned int tot_hitm_left;
-       unsigned int tot_hitm_right;
+       uint64_t tot_hitm_left;
+       uint64_t tot_hitm_right;
 
        c2c_left  = container_of(left, struct c2c_hist_entry, he);
        c2c_right = container_of(right, struct c2c_hist_entry, he);
@@ -629,7 +629,8 @@ __f ## _cmp(struct perf_hpp_fmt *fmt __maybe_unused,                        \
                                                                        \
        c2c_left  = container_of(left, struct c2c_hist_entry, he);      \
        c2c_right = container_of(right, struct c2c_hist_entry, he);     \
-       return c2c_left->stats.__f - c2c_right->stats.__f;              \
+       return (uint64_t) c2c_left->stats.__f -                         \
+              (uint64_t) c2c_right->stats.__f;                         \
 }
 
 #define STAT_FN(__f)           \
@@ -682,7 +683,8 @@ ld_llcmiss_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
        c2c_left  = container_of(left, struct c2c_hist_entry, he);
        c2c_right = container_of(right, struct c2c_hist_entry, he);
 
-       return llc_miss(&c2c_left->stats) - llc_miss(&c2c_right->stats);
+       return (uint64_t) llc_miss(&c2c_left->stats) -
+              (uint64_t) llc_miss(&c2c_right->stats);
 }
 
 static uint64_t total_records(struct c2c_stats *stats)
@@ -2384,7 +2386,7 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
        c2c_browser__update_nr_entries(browser);
 
        while (1) {
-               key = hist_browser__run(browser, "? - help", true);
+               key = hist_browser__run(browser, "? - help", true, 0);
 
                switch (key) {
                case 's':
@@ -2453,7 +2455,7 @@ static int perf_c2c__hists_browse(struct hists *hists)
        c2c_browser__update_nr_entries(browser);
 
        while (1) {
-               key = hist_browser__run(browser, "? - help", true);
+               key = hist_browser__run(browser, "? - help", true, 0);
 
                switch (key) {
                case 'q':