All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Wang Nan <wangnan0@huawei.com>
Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Li Zefan <lizefan@huawei.com>,
	pi3orama@163.com
Subject: Re: [RFC PATCH 1/5] perf trace: Apply config options in '.perfconfig'
Date: Thu, 25 Feb 2016 09:50:47 -0300	[thread overview]
Message-ID: <20160225125047.GK8720@kernel.org> (raw)
In-Reply-To: <1456390315-127562-2-git-send-email-wangnan0@huawei.com>

Em Thu, Feb 25, 2016 at 08:51:51AM +0000, Wang Nan escreveu:
> 'perf trace' doesn't read and apply options in ~/.perfconfig. If a BPF
> script is passed to 'perf trace --ev' and clang is not in $PATH,
> perf trace doesn't compile the script even clang-path is configured in
> ~/.perfconfig.
> 
> This patch makes 'perf trace' read and apply default config options
> from that file.

Right, I wonder if we can't move this initialization to perf's main
instead of having to call this for each subcommand...
 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Li Zefan <lizefan@huawei.com>
> Cc: pi3orama@163.com
> ---
>  tools/perf/builtin-trace.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 20916dd..6c52f3c 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -3108,6 +3108,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
>  		goto out;
>  	}
>  
> +	perf_config(perf_default_config, NULL);
> +
>  	argc = parse_options_subcommand(argc, argv, trace_options, trace_subcommands,
>  				 trace_usage, PARSE_OPT_STOP_AT_NON_OPTION);
>  
> -- 
> 1.8.3.4

  reply	other threads:[~2016-02-25 12:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25  8:51 [RFC PATCH 0/5] perf tools: Decode bpf output in 'perf trace' Wang Nan
2016-02-25  8:51 ` [RFC PATCH 1/5] perf trace: Apply config options in '.perfconfig' Wang Nan
2016-02-25 12:50   ` Arnaldo Carvalho de Melo [this message]
2016-02-25  8:51 ` [RFC PATCH 2/5] perf trace: Improve error message when receive non-tracepoint events Wang Nan
2016-02-25  8:51 ` [RFC PATCH 3/5] perf tools: Only set filter for tracepoints events Wang Nan
2016-02-25  8:51 ` [RFC PATCH 4/5] perf trace: Call bpf__apply_obj_config in 'perf trace' Wang Nan
2016-02-25  8:51 ` [RFC PATCH 5/5] perf trace: Print content of bpf-output event Wang Nan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160225125047.GK8720@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.