summaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorNamhyung Kim2015-05-19 10:04:10 +0200
committerArnaldo Carvalho de Melo2015-05-27 17:21:43 +0200
commit063bd9363bb8979b2939bdc0412d98a8ac062e3b (patch)
treebd9bda7ed06583eeabf2d376a2711f36fc97eea4 /tools/perf/util
parentperf session: Fix perf_session__peek_event() (diff)
downloadkernel-qcow2-linux-063bd9363bb8979b2939bdc0412d98a8ac062e3b.tar.gz
kernel-qcow2-linux-063bd9363bb8979b2939bdc0412d98a8ac062e3b.tar.xz
kernel-qcow2-linux-063bd9363bb8979b2939bdc0412d98a8ac062e3b.zip
perf hists: Reducing arguments of hist_entry_iter__add()
The evsel and sample arguments are to set iter for later use. As it also receives an iter as another argument, just set them before calling the function. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1432022650-18205-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/hist.c8
-rw-r--r--tools/perf/util/hist.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 338770679863..2504b5b1a308 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -851,19 +851,15 @@ const struct hist_iter_ops hist_iter_cumulative = {
};
int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
- struct perf_evsel *evsel, struct perf_sample *sample,
int max_stack_depth, void *arg)
{
int err, err2;
- err = sample__resolve_callchain(sample, &iter->parent, evsel, al,
- max_stack_depth);
+ err = sample__resolve_callchain(iter->sample, &iter->parent,
+ iter->evsel, al, max_stack_depth);
if (err)
return err;
- iter->evsel = evsel;
- iter->sample = sample;
-
err = iter->ops->prepare_entry(iter, al);
if (err)
goto out;
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 9f31b89a527a..5ed8d9c22981 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -111,7 +111,6 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
u64 weight, u64 transaction,
bool sample_self);
int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
- struct perf_evsel *evsel, struct perf_sample *sample,
int max_stack_depth, void *arg);
int64_t hist_entry__cmp(struct hist_entry *left, struct hist_entry *right);