aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-12-12 10:16:50 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-12-20 10:28:13 -0500
commit6581f6e35f7d0338f699fce660adb48e863f2b59 (patch)
tree415d6b105e4f714f7d5c1cd6a297eadc45e95e8f /tools
parentf3bda2c9a689b38c059f7cb2d761ff58a2996370 (diff)
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.com Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Documentation/perf-report.txt5
-rw-r--r--tools/perf/builtin-report.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index dc85392a5ac7..35af0dc8ccb4 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -80,9 +80,10 @@ OPTIONS
80--dump-raw-trace:: 80--dump-raw-trace::
81 Dump raw trace in ASCII. 81 Dump raw trace in ASCII.
82 82
83-g [type,min,order]:: 83-g [type,min[,limit],order]::
84--call-graph:: 84--call-graph::
85 Display call chains using type, min percent threshold and order. 85 Display call chains using type, min percent threshold, optional print
86 limit and order.
86 type can be either: 87 type can be either:
87 - flat: single column, linear exposure of call chains. 88 - flat: single column, linear exposure of call chains.
88 - graph: use a graph tree, displaying absolute overhead rates. 89 - graph: use a graph tree, displaying absolute overhead rates.
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index ece7c5d3f504..b2654c9fb5c6 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -407,7 +407,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
407 goto setup; 407 goto setup;
408 408
409 if (tok2[0] != 'c') { 409 if (tok2[0] != 'c') {
410 callchain_param.print_limit = strtod(tok2, &endptr); 410 callchain_param.print_limit = strtoul(tok2, &endptr, 0);
411 tok2 = strtok(NULL, ","); 411 tok2 = strtok(NULL, ",");
412 if (!tok2) 412 if (!tok2)
413 goto setup; 413 goto setup;
@@ -485,8 +485,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
485 "regex filter to identify parent, see: '--sort parent'"), 485 "regex filter to identify parent, see: '--sort parent'"),
486 OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other, 486 OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
487 "Only display entries with parent-match"), 487 "Only display entries with parent-match"),
488 OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent, call_order", 488 OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent[,print_limit],call_order",
489 "Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold and callchain order. " 489 "Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold, optional print limit and callchain order. "
490 "Default: fractal,0.5,callee", &parse_callchain_opt, callchain_default_opt), 490 "Default: fractal,0.5,callee", &parse_callchain_opt, callchain_default_opt),
491 OPT_BOOLEAN('G', "inverted", &report.inverted_callchain, 491 OPT_BOOLEAN('G', "inverted", &report.inverted_callchain,
492 "alias for inverted call graph"), 492 "alias for inverted call graph"),