Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266Ab3JZO0y (ORCPT ); Sat, 26 Oct 2013 10:26:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61992 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355Ab3JZO0R (ORCPT ); Sat, 26 Oct 2013 10:26:17 -0400 From: Jiri Olsa To: linux-kernel@vger.kernel.org Cc: Jiri Olsa , Corey Ashford , David Ahern , Ingo Molnar , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Arnaldo Carvalho de Melo , Andi Kleen , Adrian Hunter Subject: [PATCH 4/4] perf tools: Add readable output for callchain debug Date: Sat, 26 Oct 2013 16:25:36 +0200 Message-Id: <1382797536-32303-5-git-send-email-jolsa@redhat.com> In-Reply-To: <1382797536-32303-1-git-send-email-jolsa@redhat.com> References: <20131026120336.GA24439@gmail.com> <1382797536-32303-1-git-send-email-jolsa@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1911 Lines: 60 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 Cc: Corey Ashford Cc: David Ahern Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Adrian Hunter --- 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 f597b9b..8bdd608 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -736,7 +736,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 c4ed633..e84aeeb 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -209,7 +209,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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/