Skip to content

Commit bf062bd

Browse files
Taeungacmel
authored andcommitted
perf ftrace: Remove needless code setting default tracer
As a result of commit a3497642c261 ("perf ftrace: Make 'function_graph' be the default tracer") the ftrace.tracer variable can't be NULL but the other code setting default tracer remained. Signed-off-by: Taeung Song <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent e2cf00c commit bf062bd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/perf/builtin-ftrace.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
202202
{
203203
int ret;
204204
struct perf_ftrace ftrace = {
205-
.tracer = "function_graph",
205+
.tracer = DEFAULT_TRACER,
206206
.target = { .uid = UINT_MAX, },
207207
};
208208
const char * const ftrace_usage[] = {
@@ -231,9 +231,6 @@ int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
231231
if (ret < 0)
232232
goto out_delete_evlist;
233233

234-
if (ftrace.tracer == NULL)
235-
ftrace.tracer = DEFAULT_TRACER;
236-
237234
ret = __cmd_ftrace(&ftrace, argc, argv);
238235

239236
out_delete_evlist:

0 commit comments

Comments
 (0)