All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@suse.de>,
	Chandler Carruth <chandlerc@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Stephane Eranian <eranian@google.com>,
	Wang Nan <wangnan0@huawei.com>,
	Brendan Gregg <brendan.d.gregg@gmail.com>
Subject: [PATCH 1/3] perf tools: Move callchain help messages to callchain.h
Date: Thu, 22 Oct 2015 15:28:48 +0900	[thread overview]
Message-ID: <1445495330-25416-1-git-send-email-namhyung@kernel.org> (raw)

These messages will be used by 'perf top' in the next patch.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Chandler Carruth <chandlerc@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-record.c |  8 +-------
 tools/perf/builtin-report.c | 10 +++++++---
 tools/perf/util/callchain.h | 12 ++++++++++++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 24ace2f318c1..1a117623d396 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1010,13 +1010,7 @@ static struct record record = {
 	},
 };
 
-#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace) recording: "
-
-#ifdef HAVE_DWARF_UNWIND_SUPPORT
-const char record_callchain_help[] = CALLCHAIN_HELP "fp dwarf lbr";
-#else
-const char record_callchain_help[] = CALLCHAIN_HELP "fp lbr";
-#endif
+const char record_callchain_help[] = CALLCHAIN_RECORD_HELP;
 
 /*
  * XXX Will stay a global variable till we fix builtin-script.c to stop messing
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 3b23b25d1589..18a8c52d921e 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -625,6 +625,9 @@ parse_percent_limit(const struct option *opt, const char *str,
 	return 0;
 }
 
+const char report_callchain_help[] = "Display callchains using " CALLCHAIN_REPORT_HELP ". "
+				     "Default: graph,0.5,caller";
+
 int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 {
 	struct perf_session *session;
@@ -699,9 +702,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "regex filter to identify parent, see: '--sort parent'"),
 	OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
 		    "Only display entries with parent-match"),
-	OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent[,print_limit],call_order[,branch]",
-		     "Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold, optional print limit, callchain order, key (function or address), add branches. "
-		     "Default: graph,0.5,caller", &report_parse_callchain_opt, callchain_default_opt),
+	OPT_CALLBACK_DEFAULT('g', "call-graph", &report,
+			     "output_type,min_percent[,print_limit],call_order[,branch]",
+			     report_callchain_help, &report_parse_callchain_opt,
+			     callchain_default_opt),
 	OPT_BOOLEAN(0, "children", &symbol_conf.cumulate_callchain,
 		    "Accumulate callchains of children and show total overhead as well"),
 	OPT_INTEGER(0, "max-stack", &report.max_stack,
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index acee2b3cd801..c9e3a2e85a72 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -7,6 +7,18 @@
 #include "event.h"
 #include "symbol.h"
 
+#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace) recording: "
+
+#ifdef HAVE_DWARF_UNWIND_SUPPORT
+#define CALLCHAIN_RECORD_HELP  CALLCHAIN_HELP "fp dwarf lbr"
+#else
+#define CALLCHAIN_RECORD_HELP  CALLCHAIN_HELP "fp lbr"
+#endif
+
+#define CALLCHAIN_REPORT_HELP  "output_type (graph, flat, fractal, or none), " \
+	"min percent threshold, optional print limit, callchain order, " \
+	"key (function or address), add branches"
+
 enum perf_call_graph_mode {
 	CALLCHAIN_NONE,
 	CALLCHAIN_FP,
-- 
2.6.0


             reply	other threads:[~2015-10-22  6:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22  6:28 Namhyung Kim [this message]
2015-10-22  6:28 ` [PATCH 2/3] perf top: Support call-graph display options also Namhyung Kim
2015-10-22  8:23   ` Ingo Molnar
2015-10-22 12:20     ` Namhyung Kim
2015-10-22 13:57       ` Taeung Song
2015-10-22 14:34         ` Namhyung Kim
2015-10-22 18:38   ` Arnaldo Carvalho de Melo
2015-10-23  8:31   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-10-22  6:28 ` [RFC/PATCH 3/3] perf tools: Defaults to 'caller' callchain order only if --children is enabled Namhyung Kim
2015-10-22  7:32   ` Ingo Molnar
2015-10-22  7:38     ` Namhyung Kim
2015-10-22  9:49       ` Brendan Gregg
2015-10-22 14:03         ` Arnaldo Carvalho de Melo
2015-11-02 23:59           ` Brendan Gregg
2015-10-22 12:21       ` Frederic Weisbecker
2015-10-22  7:45   ` [RFC/PATCH RESEND " Namhyung Kim
2015-10-22 18:38     ` Arnaldo Carvalho de Melo
2015-10-23  8:31     ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-10-22 12:19   ` [RFC/PATCH 3/3] " Frederic Weisbecker
2015-10-22 14:13   ` Arnaldo Carvalho de Melo
2015-10-22 14:22     ` Namhyung Kim
2015-10-22 14:37       ` Arnaldo Carvalho de Melo
2015-10-22 15:51         ` Namhyung Kim
2015-10-22 16:21           ` Arnaldo Carvalho de Melo
2015-10-22  8:02 ` [PATCH 1/3] perf tools: Move callchain help messages to callchain.h Ingo Molnar
2015-10-22 12:13   ` Namhyung Kim
2015-10-22 14:17     ` Arnaldo Carvalho de Melo
2015-10-23  9:59     ` Ingo Molnar
2015-10-23 14:27       ` Arnaldo Carvalho de Melo
2015-10-23 16:40         ` Arnaldo Carvalho de Melo
2015-10-22 18:38 ` Arnaldo Carvalho de Melo
2015-10-23  8:30 ` [tip:perf/core] " tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445495330-25416-1-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=brendan.d.gregg@gmail.com \
    --cc=chandlerc@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.