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


Groups > linux.kernel > #1342790

Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script'

From "Wangnan (F)" <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script'
Date 2016-02-25 05:20 +0100
Message-ID <r5Vzb-6MZ-9@gated-at.bofh.it> (permalink)
References <r5FNM-3OI-13@gated-at.bofh.it> <r5FNM-3OI-11@gated-at.bofh.it> <r5Jon-6qY-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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.

In addition, you don't need
   ... --ev 'perf_bpf_probe:*' ...

because they should be already collected by '--ev ./test_bpf_output_3.c'.

You don't see them because the two kprobe events are filtered out by BPF 
program.
See 'return 0' in func.

Thank you.

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


Thread

[RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script' Wang Nan <wangnan0@huawei.com> - 2016-02-24 12:30 +0100
  Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf  script' Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-24 16:20 +0100
    Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf  script' "Wangnan (F)" <wangnan0@huawei.com> - 2016-02-25 05:20 +0100
      Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf  script' Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-25 13:50 +0100
  [tip:perf/core] perf script: Print bpf-output events in 'perf  script' tip-bot for Wang Nan <tipbot@zytor.com> - 2016-02-25 08:50 +0100

csiph-web