aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-04-14 17:45:51 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-14 19:46:56 -0300
commit6f736735e30f51805f6be31d20a4bf5b0ae91bae (patch)
treebc26c54ba215e4891ee6fa60e881074aa543d744 /tools/perf/builtin-trace.c
parentperf symbols: Move fprintf routines to separate object file (diff)
downloadlinux-dev-6f736735e30f51805f6be31d20a4bf5b0ae91bae.tar.xz
linux-dev-6f736735e30f51805f6be31d20a4bf5b0ae91bae.zip
perf evsel: Require that callchains be resolved before calling fprintf_{sym,callchain}
This way the print routine merely does printing, not requiring access to the resolving machinery, which helps disentangling the object files and easing creating subsets with a limited functionality set. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-2ti2jbra8fypdfawwwm3aee3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e5f0cc16bb93..0e2a82bda22f 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1890,14 +1890,16 @@ static int trace__fprintf_callchain(struct trace *trace, struct perf_evsel *evse
if (sample->callchain == NULL)
return 0;
- if (machine__resolve(trace->host, &al, sample) < 0) {
+ if (machine__resolve(trace->host, &al, sample) < 0 ||
+ thread__resolve_callchain(al.thread, &callchain_cursor, evsel,
+ sample, NULL, NULL, scripting_max_stack)) {
pr_err("Problem processing %s callchain, skipping...\n",
perf_evsel__name(evsel));
return 0;
}
- return perf_evsel__fprintf_callchain(evsel, sample, &al, 38, print_opts,
- scripting_max_stack, trace->output);
+ return sample__fprintf_callchain(sample, &al, 38, print_opts,
+ &callchain_cursor, trace->output);
}
static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,