Skip to content

Commit a601fdf

Browse files
Jiri Olsaacmel
authored andcommitted
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>
1 parent eb853e8 commit a601fdf

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎tools/perf/builtin-record.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,9 @@ int record_parse_callchain(const char *arg, struct record_opts *opts)
735735

736736
static void callchain_debug(struct record_opts *opts)
737737
{
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]);
739741

740742
if (opts->call_graph == CALLCHAIN_DWARF)
741743
pr_debug("callchain: stack dump size %d\n",

‎tools/perf/perf.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ void pthread__unblock_sigwinch(void);
251251
enum perf_call_graph_mode {
252252
CALLCHAIN_NONE,
253253
CALLCHAIN_FP,
254-
CALLCHAIN_DWARF
254+
CALLCHAIN_DWARF,
255+
CALLCHAIN_MAX
255256
};
256257

257258
struct record_opts {

0 commit comments

Comments
 (0)