diff options
author | Namhyung Kim <namhyung@kernel.org> | 2015-01-07 19:45:46 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-01-21 11:24:34 -0500 |
commit | 87bbdf768ff962f1c04d3b8f6db1e179279132d1 (patch) | |
tree | e65626a3aac1ec5ab2e6e18cb51968eb3a37423a /tools/perf/ui | |
parent | ff21cef67e85ae77682560973b8c80ef64125221 (diff) |
perf tools: Pass struct perf_hpp_fmt to its callbacks
Currently ->cmp, ->collapse and ->sort callbacks doesn't pass
corresponding fmt. But it'll be needed by upcoming changes in
perf diff command.
Suggested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1420677949-6719-6-git-send-email-namhyung@kernel.org
[ fix build by passing perf_hpp_fmt pointer to hist_entry__cmp_ methods ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/hist.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index 482adae3cc44..25d608394d74 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c | |||
@@ -285,7 +285,8 @@ static int hpp__entry_##_type(struct perf_hpp_fmt *fmt, \ | |||
285 | } | 285 | } |
286 | 286 | ||
287 | #define __HPP_SORT_FN(_type, _field) \ | 287 | #define __HPP_SORT_FN(_type, _field) \ |
288 | static int64_t hpp__sort_##_type(struct hist_entry *a, struct hist_entry *b) \ | 288 | static int64_t hpp__sort_##_type(struct perf_hpp_fmt *fmt __maybe_unused, \ |
289 | struct hist_entry *a, struct hist_entry *b) \ | ||
289 | { \ | 290 | { \ |
290 | return __hpp__sort(a, b, he_get_##_field); \ | 291 | return __hpp__sort(a, b, he_get_##_field); \ |
291 | } | 292 | } |
@@ -312,7 +313,8 @@ static int hpp__entry_##_type(struct perf_hpp_fmt *fmt, \ | |||
312 | } | 313 | } |
313 | 314 | ||
314 | #define __HPP_SORT_ACC_FN(_type, _field) \ | 315 | #define __HPP_SORT_ACC_FN(_type, _field) \ |
315 | static int64_t hpp__sort_##_type(struct hist_entry *a, struct hist_entry *b) \ | 316 | static int64_t hpp__sort_##_type(struct perf_hpp_fmt *fmt __maybe_unused, \ |
317 | struct hist_entry *a, struct hist_entry *b) \ | ||
316 | { \ | 318 | { \ |
317 | return __hpp__sort_acc(a, b, he_get_acc_##_field); \ | 319 | return __hpp__sort_acc(a, b, he_get_acc_##_field); \ |
318 | } | 320 | } |
@@ -331,7 +333,8 @@ static int hpp__entry_##_type(struct perf_hpp_fmt *fmt, \ | |||
331 | } | 333 | } |
332 | 334 | ||
333 | #define __HPP_SORT_RAW_FN(_type, _field) \ | 335 | #define __HPP_SORT_RAW_FN(_type, _field) \ |
334 | static int64_t hpp__sort_##_type(struct hist_entry *a, struct hist_entry *b) \ | 336 | static int64_t hpp__sort_##_type(struct perf_hpp_fmt *fmt __maybe_unused, \ |
337 | struct hist_entry *a, struct hist_entry *b) \ | ||
335 | { \ | 338 | { \ |
336 | return __hpp__sort(a, b, he_get_raw_##_field); \ | 339 | return __hpp__sort(a, b, he_get_raw_##_field); \ |
337 | } | 340 | } |
@@ -361,7 +364,8 @@ HPP_PERCENT_ACC_FNS(overhead_acc, period) | |||
361 | HPP_RAW_FNS(samples, nr_events) | 364 | HPP_RAW_FNS(samples, nr_events) |
362 | HPP_RAW_FNS(period, period) | 365 | HPP_RAW_FNS(period, period) |
363 | 366 | ||
364 | static int64_t hpp__nop_cmp(struct hist_entry *a __maybe_unused, | 367 | static int64_t hpp__nop_cmp(struct perf_hpp_fmt *fmt __maybe_unused, |
368 | struct hist_entry *a __maybe_unused, | ||
365 | struct hist_entry *b __maybe_unused) | 369 | struct hist_entry *b __maybe_unused) |
366 | { | 370 | { |
367 | return 0; | 371 | return 0; |