diff options
author | Jiri Olsa <jolsa@redhat.com> | 2014-02-03 06:44:43 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-18 07:34:47 -0500 |
commit | a601fdff1af20ea0208e918f5e97a247a3c37a40 (patch) | |
tree | 998d59c73a7bcb695698c3a7cbe46e89aabd2760 /tools | |
parent | eb853e80324fa87faf7ae7e1a763ad643f908f2d (diff) |
perf record: Add readable output for callchain debug
Adding people readable output for callchain debug, to get following '-v'
output:
$ perf record -v -g ls
callchain: type DWARF
callchain: stack dump size 4096
...
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1391427883-13443-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-record.c | 4 | ||||
-rw-r--r-- | tools/perf/perf.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index be9e8bc0c4aa..7b8f0e6068b3 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -735,7 +735,9 @@ int record_parse_callchain(const char *arg, struct record_opts *opts) | |||
735 | 735 | ||
736 | static void callchain_debug(struct record_opts *opts) | 736 | static void callchain_debug(struct record_opts *opts) |
737 | { | 737 | { |
738 | pr_debug("callchain: type %d\n", opts->call_graph); | 738 | static const char *str[CALLCHAIN_MAX] = { "NONE", "FP", "DWARF" }; |
739 | |||
740 | pr_debug("callchain: type %s\n", str[opts->call_graph]); | ||
739 | 741 | ||
740 | if (opts->call_graph == CALLCHAIN_DWARF) | 742 | if (opts->call_graph == CALLCHAIN_DWARF) |
741 | pr_debug("callchain: stack dump size %d\n", | 743 | pr_debug("callchain: stack dump size %d\n", |
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 2078f334617c..6898ad0e199f 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -251,7 +251,8 @@ void pthread__unblock_sigwinch(void); | |||
251 | enum perf_call_graph_mode { | 251 | enum perf_call_graph_mode { |
252 | CALLCHAIN_NONE, | 252 | CALLCHAIN_NONE, |
253 | CALLCHAIN_FP, | 253 | CALLCHAIN_FP, |
254 | CALLCHAIN_DWARF | 254 | CALLCHAIN_DWARF, |
255 | CALLCHAIN_MAX | ||
255 | }; | 256 | }; |
256 | 257 | ||
257 | struct record_opts { | 258 | struct record_opts { |