diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-22 11:05:06 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-18 07:34:46 -0500 |
commit | e80faac0460f178a5be576b4260897f997109e73 (patch) | |
tree | a984496c8f392b4c41979059a1547c6ddd1d25c4 /tools/perf | |
parent | 17f22a3fbc9d81c1d8f9f853dd23d0e5e8f4c994 (diff) |
perf tools: Shorten sample symbol resolving function signature
Since three of the parameters come from the same 'struct addr_location',
rename machine__resolve_mem() to sample__resolve_mem() and pass the
that addr_location instead.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-3f5otpssefh9l5hi1t259h8n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-report.c | 2 | ||||
-rw-r--r-- | tools/perf/util/hist.c | 2 | ||||
-rw-r--r-- | tools/perf/util/machine.c | 11 | ||||
-rw-r--r-- | tools/perf/util/machine.h | 5 |
4 files changed, 9 insertions, 11 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 8f9d6edb4674..0d381dc0e261 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -88,7 +88,7 @@ static int report__add_mem_hist_entry(struct perf_tool *tool, struct addr_locati | |||
88 | if (err) | 88 | if (err) |
89 | return err; | 89 | return err; |
90 | 90 | ||
91 | mi = machine__resolve_mem(al->machine, al->thread, sample, al->cpumode); | 91 | mi = sample__resolve_mem(sample, al); |
92 | if (!mi) | 92 | if (!mi) |
93 | return -ENOMEM; | 93 | return -ENOMEM; |
94 | 94 | ||
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index e4e6249b87d4..6240ca42abf4 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -369,7 +369,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists, | |||
369 | he_stat__add_period(&he->stat, period, weight); | 369 | he_stat__add_period(&he->stat, period, weight); |
370 | 370 | ||
371 | /* | 371 | /* |
372 | * This mem info was allocated from machine__resolve_mem | 372 | * This mem info was allocated from sample__resolve_mem |
373 | * and will not be used anymore. | 373 | * and will not be used anymore. |
374 | */ | 374 | */ |
375 | zfree(&entry->mem_info); | 375 | zfree(&entry->mem_info); |
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index c872991e0f65..0d304d84afb4 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c | |||
@@ -1238,18 +1238,17 @@ static void ip__resolve_data(struct machine *machine, struct thread *thread, | |||
1238 | ams->map = al.map; | 1238 | ams->map = al.map; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | struct mem_info *machine__resolve_mem(struct machine *machine, | 1241 | struct mem_info *sample__resolve_mem(struct perf_sample *sample, |
1242 | struct thread *thr, | 1242 | struct addr_location *al) |
1243 | struct perf_sample *sample, | ||
1244 | u8 cpumode) | ||
1245 | { | 1243 | { |
1246 | struct mem_info *mi = zalloc(sizeof(*mi)); | 1244 | struct mem_info *mi = zalloc(sizeof(*mi)); |
1247 | 1245 | ||
1248 | if (!mi) | 1246 | if (!mi) |
1249 | return NULL; | 1247 | return NULL; |
1250 | 1248 | ||
1251 | ip__resolve_ams(machine, thr, &mi->iaddr, sample->ip); | 1249 | ip__resolve_ams(al->machine, al->thread, &mi->iaddr, sample->ip); |
1252 | ip__resolve_data(machine, thr, cpumode, &mi->daddr, sample->addr); | 1250 | ip__resolve_data(al->machine, al->thread, al->cpumode, |
1251 | &mi->daddr, sample->addr); | ||
1253 | mi->data_src.val = sample->data_src; | 1252 | mi->data_src.val = sample->data_src; |
1254 | 1253 | ||
1255 | return mi; | 1254 | return mi; |
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index f77e91e483dc..9ddacd9b3595 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h | |||
@@ -94,9 +94,8 @@ void machine__delete(struct machine *machine); | |||
94 | struct branch_info *machine__resolve_bstack(struct machine *machine, | 94 | struct branch_info *machine__resolve_bstack(struct machine *machine, |
95 | struct thread *thread, | 95 | struct thread *thread, |
96 | struct branch_stack *bs); | 96 | struct branch_stack *bs); |
97 | struct mem_info *machine__resolve_mem(struct machine *machine, | 97 | struct mem_info *sample__resolve_mem(struct perf_sample *sample, |
98 | struct thread *thread, | 98 | struct addr_location *al); |
99 | struct perf_sample *sample, u8 cpumode); | ||
100 | int machine__resolve_callchain(struct machine *machine, | 99 | int machine__resolve_callchain(struct machine *machine, |
101 | struct perf_evsel *evsel, | 100 | struct perf_evsel *evsel, |
102 | struct thread *thread, | 101 | struct thread *thread, |