[tip:perf/core] perf ftrace: Make 'function_graph' be the default tracer

From: tip-bot for Arnaldo Carvalho de Melo
Date: Thu Jan 26 2017 - 10:34:53 EST


Commit-ID: ec347870a9d423a4b88657d6a85b5163b3f949ee
Gitweb: http://git.kernel.org/tip/ec347870a9d423a4b88657d6a85b5163b3f949ee
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Wed, 18 Jan 2017 21:49:14 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Thu, 26 Jan 2017 11:43:01 -0300

perf ftrace: Make 'function_graph' be the default tracer

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 <mhiramat@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jeremy Eder <jeder@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-ss9xgx5htpxcv86x42pnh3m6@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
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 c320ae2..d05658d 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()