aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-09-10 12:50:16 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-09-11 11:01:15 -0400
commitbdde37163e1fd474509aab90f5eaacee46100107 (patch)
treeb02af2b7904946f02ca30952f9d2ed0ca556611b /tools/perf
parent9ac3e487f0eeef0fa058d72da7681398cc052ee9 (diff)
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: Jiri 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.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/session.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 3806ea49f1f7..0ecd62be2091 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -388,6 +388,11 @@ int machine__resolve_callchain(struct machine *machine,
388 (evsel->attr.sample_type & PERF_SAMPLE_STACK_USER))) 388 (evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))
389 return 0; 389 return 0;
390 390
391 /* Bail out if nothing was captured. */
392 if ((!sample->user_regs.regs) ||
393 (!sample->user_stack.size))
394 return 0;
395
391 return unwind__get_entries(unwind_entry, &callchain_cursor, machine, 396 return unwind__get_entries(unwind_entry, &callchain_cursor, machine,
392 thread, evsel->attr.sample_regs_user, 397 thread, evsel->attr.sample_regs_user,
393 sample); 398 sample);