From: Arnaldo Carvalho de Melo <a...@redhat.com>

So that we can suppress the '-t function_graph' and get a more compact command
line:

  # perf ftrace usleep 123456 | grep raw_spin_lock | sort -k2 -nr | head -5
  2)   0.555 us    |                _raw_spin_lock();
  2)   0.516 us    |          _raw_spin_lock();
  2)   0.410 us    |          _raw_spin_lock_irq();
  2)   0.374 us    |                        _raw_spin_lock_irqsave();
  #

Tested-by: Masami Hiramatsu <mhira...@kernel.org>
Cc: Adrian Hunter <adrian.hun...@intel.com>
Cc: David Ahern <dsah...@gmail.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Jeremy Eder <je...@redhat.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@google.com>
Cc: Steven Rostedt <rost...@goodmis.org>
Cc: Wang Nan <wangn...@huawei.com>
Link: http://lkml.kernel.org/n/tip-ss9xgx5htpxcv86x42pnh...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/builtin-ftrace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index c320ae25c8e6..d05658d2b8f1 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -202,6 +202,7 @@ int cmd_ftrace(int argc, const char **argv, const char 
*prefix __maybe_unused)
 {
        int ret;
        struct perf_ftrace ftrace = {
+               .tracer = "function_graph",
                .target = { .uid = UINT_MAX, },
        };
        const char * const ftrace_usage[] = {
@@ -211,7 +212,7 @@ int cmd_ftrace(int argc, const char **argv, const char 
*prefix __maybe_unused)
        };
        const struct option ftrace_options[] = {
        OPT_STRING('t', "tracer", &ftrace.tracer, "tracer",
-                  "tracer to use: function_graph or function"),
+                  "tracer to use: function_graph(default) or function"),
        OPT_INCR('v', "verbose", &verbose,
                 "be more verbose"),
        OPT_END()
-- 
2.9.3

Reply via email to