summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2014-01-22 17:15:36 +0100
committerArnaldo Carvalho de Melo2014-02-18 13:34:46 +0100
commit644f2df29faf66f408fea2e50f16d3b5302403da (patch)
tree408d616d1f54e26e706b4b408abeb0c10cd9d9d3 /tools/perf/util/machine.c
parentperf tools: Shorten sample symbol resolving function signature (diff)
downloadkernel-qcow2-linux-644f2df29faf66f408fea2e50f16d3b5302403da.tar.gz
kernel-qcow2-linux-644f2df29faf66f408fea2e50f16d3b5302403da.tar.xz
kernel-qcow2-linux-644f2df29faf66f408fea2e50f16d3b5302403da.zip
perf tools: Shorten sample symbol resolving function signature
Since two of the parameters come from the same 'struct addr_location', rename machine__resolve_bstack() to sample__resolve_bstack() and pass the that addr_location instead. This is also for consistency with the same change that resulted in the sample__resolve_mem() function. 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-99ecqt8jiyyksiyx3se7l5ia@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r--tools/perf/util/machine.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 0d304d84afb4..6c08ab03a697 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1254,20 +1254,19 @@ struct mem_info *sample__resolve_mem(struct perf_sample *sample,
return mi;
}
-struct branch_info *machine__resolve_bstack(struct machine *machine,
- struct thread *thr,
- struct branch_stack *bs)
+struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
+ struct addr_location *al)
{
- struct branch_info *bi;
unsigned int i;
+ const struct branch_stack *bs = sample->branch_stack;
+ struct branch_info *bi = calloc(bs->nr, sizeof(struct branch_info));
- bi = calloc(bs->nr, sizeof(struct branch_info));
if (!bi)
return NULL;
for (i = 0; i < bs->nr; i++) {
- ip__resolve_ams(machine, thr, &bi[i].to, bs->entries[i].to);
- ip__resolve_ams(machine, thr, &bi[i].from, bs->entries[i].from);
+ ip__resolve_ams(al->machine, al->thread, &bi[i].to, bs->entries[i].to);
+ ip__resolve_ams(al->machine, al->thread, &bi[i].from, bs->entries[i].from);
bi[i].flags = bs->entries[i].flags;
}
return bi;