From fd36f3dd79331b9610664b867ff205465bf9ce68 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Wed, 23 Dec 2015 02:06:58 +0900 Subject: perf hist: Pass struct sample to __hists__add_entry() This is a preparation to add more info into the hist_entry. Also it already passes too many argument, so passing sample directly will reduce the overhead of the function call. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-diff.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools/perf/builtin-diff.c') diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 0b180a885ba3..69f5b1feff39 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -311,11 +311,11 @@ static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, } static int hists__add_entry(struct hists *hists, - struct addr_location *al, u64 period, - u64 weight, u64 transaction) + struct addr_location *al, + struct perf_sample *sample) { - if (__hists__add_entry(hists, al, NULL, NULL, NULL, period, weight, - transaction, true) != NULL) + if (__hists__add_entry(hists, al, NULL, NULL, NULL, + sample, true) != NULL) return 0; return -ENOMEM; } @@ -336,8 +336,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused, return -1; } - if (hists__add_entry(hists, &al, sample->period, - sample->weight, sample->transaction)) { + if (hists__add_entry(hists, &al, sample)) { pr_warning("problem incrementing symbol period, skipping event\n"); goto out_put; } -- cgit v1.2.1