提交 bdde3716 编写于 作者: J Jiri Olsa 提交者: Arnaldo Carvalho de Melo

perf tools: Do backtrace post unwind only if we regs and stack were captured

Bail out without error if we want to do backtrace post unwind, but were
not able to capture user registers or user stack during the record
phase, which is possible and valid case.
Signed-off-by: NJiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1347295819-23177-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 9ac3e487
...@@ -388,6 +388,11 @@ int machine__resolve_callchain(struct machine *machine, ...@@ -388,6 +388,11 @@ int machine__resolve_callchain(struct machine *machine,
(evsel->attr.sample_type & PERF_SAMPLE_STACK_USER))) (evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))
return 0; return 0;
/* Bail out if nothing was captured. */
if ((!sample->user_regs.regs) ||
(!sample->user_stack.size))
return 0;
return unwind__get_entries(unwind_entry, &callchain_cursor, machine, return unwind__get_entries(unwind_entry, &callchain_cursor, machine,
thread, evsel->attr.sample_regs_user, thread, evsel->attr.sample_regs_user,
sample); sample);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册