mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
ff21cef67e
commit
87bbdf768f
5 changed files with 61 additions and 18 deletions
|
@ -554,14 +554,16 @@ hist_entry__cmp_compute(struct hist_entry *left, struct hist_entry *right,
|
|||
}
|
||||
|
||||
static int64_t
|
||||
hist_entry__cmp_nop(struct hist_entry *left __maybe_unused,
|
||||
hist_entry__cmp_nop(struct perf_hpp_fmt *fmt __maybe_unused,
|
||||
struct hist_entry *left __maybe_unused,
|
||||
struct hist_entry *right __maybe_unused)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int64_t
|
||||
hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
|
||||
hist_entry__cmp_baseline(struct perf_hpp_fmt *fmt __maybe_unused,
|
||||
struct hist_entry *left, struct hist_entry *right)
|
||||
{
|
||||
if (sort_compute)
|
||||
return 0;
|
||||
|
@ -572,19 +574,22 @@ hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
|
|||
}
|
||||
|
||||
static int64_t
|
||||
hist_entry__cmp_delta(struct hist_entry *left, struct hist_entry *right)
|
||||
hist_entry__cmp_delta(struct perf_hpp_fmt *fmt __maybe_unused,
|
||||
struct hist_entry *left, struct hist_entry *right)
|
||||
{
|
||||
return hist_entry__cmp_compute(right, left, COMPUTE_DELTA);
|
||||
}
|
||||
|
||||
static int64_t
|
||||
hist_entry__cmp_ratio(struct hist_entry *left, struct hist_entry *right)
|
||||
hist_entry__cmp_ratio(struct perf_hpp_fmt *fmt __maybe_unused,
|
||||
struct hist_entry *left, struct hist_entry *right)
|
||||
{
|
||||
return hist_entry__cmp_compute(right, left, COMPUTE_RATIO);
|
||||
}
|
||||
|
||||
static int64_t
|
||||
hist_entry__cmp_wdiff(struct hist_entry *left, struct hist_entry *right)
|
||||
hist_entry__cmp_wdiff(struct perf_hpp_fmt *fmt __maybe_unused,
|
||||
struct hist_entry *left, struct hist_entry *right)
|
||||
{
|
||||
return hist_entry__cmp_compute(right, left, COMPUTE_WEIGHTED_DIFF);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue