Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1258004
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH net-next 2/4] perf tools: Introduce bpf-output event |
| Date | 2015-10-28 14:20 +0100 |
| Message-ID | <qoyNZ-35R-45@gated-at.bofh.it> (permalink) |
| References | <qowCu-1y1-7@gated-at.bofh.it> <qowM9-1Rt-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello.
On 10/28/2015 1:55 PM, Wang Nan wrote:
> Commit a43eec304259a6c637f4014a6d4767159b6a3aa3 (bpf: introduce
> bpf_perf_event_output() helper) add a helper to enable BPF program
You haven't run the patch thru scripts/checkpath.pl, I guess? It now
enforces the certain style of citing a commit.
> output data to perf ring buffer through a new type of perf event
> PERF_COUNT_SW_BPF_OUTPUT. This patch enable perf to create perf
> event of that type. Now perf user can use following cmdline to
> receive output data from BPF programs:
>
> # perf record -a -e evt=bpf-output/no-inherit/ \
> -e ./test_bpf_output.c/maps.bpf-output.event=evt/ ls
>
> # perf script
> perf 12927 [004] 355971.129276: 0 evt=bpf-output/no-inherit/: ffffffff811ed5f1 sys_write
> perf 12927 [004] 355971.129279: 0 evt=bpf-output/no-inherit/: ffffffff811ed5f1 sys_write
> ...
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Alexei Starovoitov <ast@plumgrid.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
> ---
> tools/perf/util/evsel.c | 6 ++++++
> tools/perf/util/parse-events.c | 4 ++++
> tools/perf/util/parse-events.l | 1 +
> 3 files changed, 11 insertions(+)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 397fb4e..f01defb 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -224,6 +224,12 @@ struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
> if (evsel != NULL)
> perf_evsel__init(evsel, attr, idx);
>
> + if ((evsel->attr.type == PERF_TYPE_SOFTWARE) &&
> + (evsel->attr.config == PERF_COUNT_SW_BPF_OUTPUT)) {
Inner parens not necessary here.
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH net-next 0/4] perf tools: Support receiving output through BPF programs Wang Nan <wangnan0@huawei.com> - 2015-10-28 12:00 +0100
[RFC PATCH net-next 4/4] perf data: Support converting data from bpf_perf_event_output() Wang Nan <wangnan0@huawei.com> - 2015-10-28 12:00 +0100
Re: [RFC PATCH net-next 0/4] perf tools: Support receiving output through BPF programs "Wangnan (F)" <wangnan0@huawei.com> - 2015-10-28 12:10 +0100
[RFC PATCH net-next 2/4] perf tools: Introduce bpf-output event Wang Nan <wangnan0@huawei.com> - 2015-10-28 12:10 +0100
Re: [RFC PATCH net-next 2/4] perf tools: Introduce bpf-output event Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-28 14:20 +0100
csiph-web