Commit 0cdccac6fe4b1316f04f0dbfcc4efab51932014a
Committed by
Arnaldo Carvalho de Melo
1 parent
b2e19a934a
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
perf report: Set callchain_param.record_mode for future use
Normally the callchain_param.record_mode is used only for record path. But as it might need to prepare something for dwarf unwinding, setup this info for perf report too. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1412556363-26229-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff
tools/perf/builtin-report.c
... | ... | @@ -257,6 +257,13 @@ |
257 | 257 | } |
258 | 258 | } |
259 | 259 | |
260 | + if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) { | |
261 | + if ((sample_type & PERF_SAMPLE_REGS_USER) && | |
262 | + (sample_type & PERF_SAMPLE_STACK_USER)) | |
263 | + callchain_param.record_mode = CALLCHAIN_DWARF; | |
264 | + else | |
265 | + callchain_param.record_mode = CALLCHAIN_FP; | |
266 | + } | |
260 | 267 | return 0; |
261 | 268 | } |
262 | 269 |
tools/perf/tests/dwarf-unwind.c
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | #include "perf_regs.h" |
10 | 10 | #include "map.h" |
11 | 11 | #include "thread.h" |
12 | +#include "callchain.h" | |
12 | 13 | |
13 | 14 | static int mmap_handler(struct perf_tool *tool __maybe_unused, |
14 | 15 | union perf_event *event, |
... | ... | @@ -119,6 +120,8 @@ |
119 | 120 | pr_err("Could not get machine\n"); |
120 | 121 | return -1; |
121 | 122 | } |
123 | + | |
124 | + callchain_param.record_mode = CALLCHAIN_DWARF; | |
122 | 125 | |
123 | 126 | if (init_live_machine(machine)) { |
124 | 127 | pr_err("Could not init machine\n"); |