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>
This commit is contained in:
Jiri Olsa 2014-02-03 12:44:43 +01:00 коммит произвёл Arnaldo Carvalho de Melo
Родитель eb853e8032
Коммит a601fdff1a
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -735,7 +735,9 @@ int record_parse_callchain(const char *arg, struct record_opts *opts)
static void callchain_debug(struct record_opts *opts) static void callchain_debug(struct 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) if (opts->call_graph == CALLCHAIN_DWARF)
pr_debug("callchain: stack dump size %d\n", pr_debug("callchain: stack dump size %d\n",

Просмотреть файл

@ -251,7 +251,8 @@ void pthread__unblock_sigwinch(void);
enum perf_call_graph_mode { enum perf_call_graph_mode {
CALLCHAIN_NONE, CALLCHAIN_NONE,
CALLCHAIN_FP, CALLCHAIN_FP,
CALLCHAIN_DWARF CALLCHAIN_DWARF,
CALLCHAIN_MAX
}; };
struct record_opts { struct record_opts {