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 ... Tested-Reviewed-by: David Ahern <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Adrian Hunter <[email protected]> --- tools/perf/builtin-record.c | 4 +++- 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 2d00a19..04c5cf9 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -770,7 +770,9 @@ int record_parse_callchain(const char *arg, struct perf_record_opts *opts) static void callchain_debug(struct perf_record_opts *opts) { - pr_debug("callchain: type %d\n", opts->call_graph); + static const char *str[CALLCHAIN_MAX] = { "NONE", "FP", "DWARF" }; + + pr_debug("callchain: type %s\n", str[opts->call_graph]); if (opts->call_graph == CALLCHAIN_DWARF) pr_debug("callchain: stack dump size %d\n", diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 27223fb..313a5df 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -207,7 +207,8 @@ void pthread__unblock_sigwinch(void); enum perf_call_graph_mode { CALLCHAIN_NONE, CALLCHAIN_FP, - CALLCHAIN_DWARF + CALLCHAIN_DWARF, + CALLCHAIN_MAX }; struct perf_record_opts { -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

