From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Wangnan (F)" <wangnan0@huawei.com>
Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Brendan Gregg <brendan.d.gregg@gmail.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>, Li Zefan <lizefan@huawei.com>,
pi3orama@163.com
Subject: Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script'
Date: Thu, 25 Feb 2016 09:49:24 -0300 [thread overview]
Message-ID: <20160225124924.GJ8720@kernel.org> (raw)
In-Reply-To: <56CE7EDF.7030808@huawei.com>
Em Thu, Feb 25, 2016 at 12:11:11PM +0800, Wangnan (F) escreveu:
>
>
> On 2016/2/24 23:19, Arnaldo Carvalho de Melo wrote:
> >Em Wed, Feb 24, 2016 at 11:20:45AM +0000, Wang Nan escreveu:
> >>This patch allows 'perf script' output messages from BPF program.
> >>For example, use test_bpf_output_3.c at the end of this commit
> >>message,
> >>
> >> # ./perf record -e bpf-output/no-inherit,name=evt/ \
> >> -e ./test_bpf_output_3.c/map:channel.event=evt/ \
> >> usleep 100000
> >Trying to test this with 'perf trace', i.e. to shortcircuit record +
> >analysis:
> >
> >[root@jouet bpf]# perf trace -a --ev bpf-output/no-inherit,name=evt/ --ev ./test_bpf_output_3.c/map:channel.event=evt/ --ev 'perf_bpf_probe:*' usleep 100000
> >Failed to set filter "common_pid != 23954" on event evt with 22 (Invalid argument)
> >
> >Can't we set tracepoint filters on these events?
> No we can't. filters can only be set to tracepoint events, but
> bpf-output is a software event.
Gack, should've checked that, I somehow thought that it was a tracepoint
event of some sort.
> In addition, you don't need
> ... --ev 'perf_bpf_probe:*' ...
>
> because they should be already collected by '--ev ./test_bpf_output_3.c'.
Right, that was me trying to be clever 8-)
> You don't see them because the two kprobe events are filtered out by
> BPF program. See 'return 0' in func.
Thanks for reminding about this part...
> Thank you.
next prev parent reply other threads:[~2016-02-25 12:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 11:20 [RFC PATCH 0/2] perf tools: Print bpf-output events in 'perf script' Wang Nan
2016-02-24 11:20 ` [RFC PATCH 1/2] perf tools: Make binary data printer code in trace_event public available Wang Nan
2016-02-25 7:40 ` [tip:perf/core] " tip-bot for Wang Nan
2016-02-24 11:20 ` [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script' Wang Nan
2016-02-24 15:19 ` Arnaldo Carvalho de Melo
2016-02-25 4:11 ` Wangnan (F)
2016-02-25 12:49 ` Arnaldo Carvalho de Melo [this message]
2016-02-25 7:40 ` [tip:perf/core] " tip-bot for Wang Nan
2016-02-24 15:12 ` [RFC PATCH 0/2] perf tools: " Arnaldo Carvalho de Melo
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=20160225124924.GJ8720@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=brendan.d.gregg@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).