Commit 21cf6284 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf tools: Move callchain help messages to callchain.h

These messages will be used by 'perf top' in the next patch.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Chandler Carruth <chandlerc@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1445495330-25416-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b6bd9c7d
...@@ -1010,13 +1010,7 @@ static struct record record = { ...@@ -1010,13 +1010,7 @@ static struct record record = {
}, },
}; };
#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace) recording: " const char record_callchain_help[] = CALLCHAIN_RECORD_HELP;
#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
/* /*
* XXX Will stay a global variable till we fix builtin-script.c to stop messing * XXX Will stay a global variable till we fix builtin-script.c to stop messing
......
...@@ -625,6 +625,9 @@ parse_percent_limit(const struct option *opt, const char *str, ...@@ -625,6 +625,9 @@ parse_percent_limit(const struct option *opt, const char *str,
return 0; 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) int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
{ {
struct perf_session *session; struct perf_session *session;
...@@ -699,9 +702,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) ...@@ -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'"), "regex filter to identify parent, see: '--sort parent'"),
OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other, OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
"Only display entries with parent-match"), "Only display entries with parent-match"),
OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent[,print_limit],call_order[,branch]", OPT_CALLBACK_DEFAULT('g', "call-graph", &report,
"Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold, optional print limit, callchain order, key (function or address), add branches. " "output_type,min_percent[,print_limit],call_order[,branch]",
"Default: graph,0.5,caller", &report_parse_callchain_opt, callchain_default_opt), report_callchain_help, &report_parse_callchain_opt,
callchain_default_opt),
OPT_BOOLEAN(0, "children", &symbol_conf.cumulate_callchain, OPT_BOOLEAN(0, "children", &symbol_conf.cumulate_callchain,
"Accumulate callchains of children and show total overhead as well"), "Accumulate callchains of children and show total overhead as well"),
OPT_INTEGER(0, "max-stack", &report.max_stack, OPT_INTEGER(0, "max-stack", &report.max_stack,
......
...@@ -7,6 +7,18 @@ ...@@ -7,6 +7,18 @@
#include "event.h" #include "event.h"
#include "symbol.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 { enum perf_call_graph_mode {
CALLCHAIN_NONE, CALLCHAIN_NONE,
CALLCHAIN_FP, CALLCHAIN_FP,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment