Commit 6581f6e3 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf report: Document '--call-graph' for optional print_limit argument

The '--call-graph' command line option can receive undocumented optional
print_limit argument. Besides, use strtoul() to parse the option since
its type is u32.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1323703017-6060-2-git-send-email-namhyung@gmail.comSigned-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f3bda2c9
...@@ -80,9 +80,10 @@ OPTIONS ...@@ -80,9 +80,10 @@ OPTIONS
--dump-raw-trace:: --dump-raw-trace::
Dump raw trace in ASCII. Dump raw trace in ASCII.
-g [type,min,order]:: -g [type,min[,limit],order]::
--call-graph:: --call-graph::
Display call chains using type, min percent threshold and order. Display call chains using type, min percent threshold, optional print
limit and order.
type can be either: type can be either:
- flat: single column, linear exposure of call chains. - flat: single column, linear exposure of call chains.
- graph: use a graph tree, displaying absolute overhead rates. - graph: use a graph tree, displaying absolute overhead rates.
......
...@@ -407,7 +407,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset) ...@@ -407,7 +407,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
goto setup; goto setup;
if (tok2[0] != 'c') { if (tok2[0] != 'c') {
callchain_param.print_limit = strtod(tok2, &endptr); callchain_param.print_limit = strtoul(tok2, &endptr, 0);
tok2 = strtok(NULL, ","); tok2 = strtok(NULL, ",");
if (!tok2) if (!tok2)
goto setup; goto setup;
...@@ -485,8 +485,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __used) ...@@ -485,8 +485,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
"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, call_order", OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent[,print_limit],call_order",
"Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold and callchain order. " "Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold, optional print limit and callchain order. "
"Default: fractal,0.5,callee", &parse_callchain_opt, callchain_default_opt), "Default: fractal,0.5,callee", &parse_callchain_opt, callchain_default_opt),
OPT_BOOLEAN('G', "inverted", &report.inverted_callchain, OPT_BOOLEAN('G', "inverted", &report.inverted_callchain,
"alias for inverted call graph"), "alias for inverted call graph"),
......
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