Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1567650

Re: [PATCH 1/3] perf ftrace: Remove needless code setting default tracer

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] perf ftrace: Remove needless code setting default tracer
Date 2017-01-26 20:00 +0100
Message-ID <t3Xr3-2rI-1@gated-at.bofh.it> (permalink)
References <t3OH8-5Cz-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Thu, Jan 26, 2017 at 06:35:37PM +0900, Taeung Song escreveu:
> Lately commit a349764 made 'function_graph' be the default tracer.
> So ftrace.tracer variable can't be NULL but the other code setting default
> tracer remained. For this reason, remove it as below.
> And use existing DEFAULT_TRACER instead of "function_graph".

Rewrote a bit the commit log, applied,

- Arnaldo
 
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
> ---
>  tools/perf/builtin-ftrace.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> index d05658d..414444d 100644
> --- a/tools/perf/builtin-ftrace.c
> +++ b/tools/perf/builtin-ftrace.c
> @@ -202,7 +202,7 @@ int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
>  {
>  	int ret;
>  	struct perf_ftrace ftrace = {
> -		.tracer = "function_graph",
> +		.tracer = DEFAULT_TRACER,
>  		.target = { .uid = UINT_MAX, },
>  	};
>  	const char * const ftrace_usage[] = {
> @@ -231,9 +231,6 @@ int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
>  	if (ret < 0)
>  		goto out_delete_evlist;
>  
> -	if (ftrace.tracer == NULL)
> -		ftrace.tracer = DEFAULT_TRACER;
> -
>  	ret = __cmd_ftrace(&ftrace, argc, argv);
>  
>  out_delete_evlist:
> -- 
> 2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] perf ftrace: Remove needless code setting default tracer Taeung Song <treeze.taeung@gmail.com> - 2017-01-26 10:40 +0100
  [PATCH 3/3] perf ftrace: Handle NULL at write_tracing_file() Taeung Song <treeze.taeung@gmail.com> - 2017-01-26 10:40 +0100
  Re: [PATCH 1/3] perf ftrace: Remove needless code setting default  tracer Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-26 20:00 +0100

csiph-web