perf tools: Make several sorting functions global
authorJiri Olsa <[email protected]>
Thu, 22 Sep 2016 15:36:34 +0000 (17:36 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 22 Sep 2016 16:08:57 +0000 (13:08 -0300)
Will be used from external places in the upcoming c2c patch series.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Joe Mario <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/sort.c
tools/perf/util/sort.h

index 9f7c1ea9e3adcf4e47151cc9e3d7d224183fef29..452e15a10dd28f53951b4ae8aaf08b1928e9a805 100644 (file)
@@ -867,7 +867,7 @@ struct sort_entry sort_cycles = {
 };
 
 /* --sort daddr_sym */
-static int64_t
+int64_t
 sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right)
 {
        uint64_t l = 0, r = 0;
@@ -896,7 +896,7 @@ static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf,
                                         width);
 }
 
-static int64_t
+int64_t
 sort__iaddr_cmp(struct hist_entry *left, struct hist_entry *right)
 {
        uint64_t l = 0, r = 0;
@@ -1062,7 +1062,7 @@ static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf,
        return repsep_snprintf(bf, size, "%-*s", width, out);
 }
 
-static int64_t
+int64_t
 sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right)
 {
        u64 l, r;
index e93b0fa43704a3e47176dac5b896626826e5e560..099c97557d33c5ed317278375fe78648d2744da0 100644 (file)
@@ -274,4 +274,10 @@ int sort_dimension__add(struct perf_hpp_list *list, const char *tok,
                        struct perf_evlist *evlist,
                        int level);
 int output_field_add(struct perf_hpp_list *list, char *tok);
+int64_t
+sort__iaddr_cmp(struct hist_entry *left, struct hist_entry *right);
+int64_t
+sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right);
+int64_t
+sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right);
 #endif /* __PERF_SORT_H */