diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-09-22 11:36:34 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-22 12:08:57 -0400 |
commit | 5fe7b9b47c646dbe8501378eb3684ccd802d6d25 (patch) | |
tree | d8fb84566e070fd723813b793db0fa3c72046a92 /tools | |
parent | a76490e4cd5d971d6f6c22aeed0625bb352d2a08 (diff) |
perf tools: Make several sorting functions global
Will be used from external places in the upcoming c2c patch series.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1474558645-19956-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/sort.c | 6 | ||||
-rw-r--r-- | tools/perf/util/sort.h | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 9f7c1ea9e3ad..452e15a10dd2 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -867,7 +867,7 @@ struct sort_entry sort_cycles = { | |||
867 | }; | 867 | }; |
868 | 868 | ||
869 | /* --sort daddr_sym */ | 869 | /* --sort daddr_sym */ |
870 | static int64_t | 870 | int64_t |
871 | sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right) | 871 | sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right) |
872 | { | 872 | { |
873 | uint64_t l = 0, r = 0; | 873 | uint64_t l = 0, r = 0; |
@@ -896,7 +896,7 @@ static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf, | |||
896 | width); | 896 | width); |
897 | } | 897 | } |
898 | 898 | ||
899 | static int64_t | 899 | int64_t |
900 | sort__iaddr_cmp(struct hist_entry *left, struct hist_entry *right) | 900 | sort__iaddr_cmp(struct hist_entry *left, struct hist_entry *right) |
901 | { | 901 | { |
902 | uint64_t l = 0, r = 0; | 902 | uint64_t l = 0, r = 0; |
@@ -1062,7 +1062,7 @@ static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, | |||
1062 | return repsep_snprintf(bf, size, "%-*s", width, out); | 1062 | return repsep_snprintf(bf, size, "%-*s", width, out); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static int64_t | 1065 | int64_t |
1066 | sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right) | 1066 | sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right) |
1067 | { | 1067 | { |
1068 | u64 l, r; | 1068 | u64 l, r; |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index e93b0fa43704..099c97557d33 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h | |||
@@ -274,4 +274,10 @@ int sort_dimension__add(struct perf_hpp_list *list, const char *tok, | |||
274 | struct perf_evlist *evlist, | 274 | struct perf_evlist *evlist, |
275 | int level); | 275 | int level); |
276 | int output_field_add(struct perf_hpp_list *list, char *tok); | 276 | int output_field_add(struct perf_hpp_list *list, char *tok); |
277 | int64_t | ||
278 | sort__iaddr_cmp(struct hist_entry *left, struct hist_entry *right); | ||
279 | int64_t | ||
280 | sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right); | ||
281 | int64_t | ||
282 | sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right); | ||
277 | #endif /* __PERF_SORT_H */ | 283 | #endif /* __PERF_SORT_H */ |