mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
bfbba189b6
commit
6f736735e3
4 changed files with 47 additions and 53 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue