From: Wang Nan <wangnan0@huawei.com>
To: <acme@kernel.org>
Cc: <pi3orama@163.com>, <linux-kernel@vger.kernel.org>,
<lizefan@huawei.com>, <wangnan0@huawei.com>
Subject: [PATCH 0/4] perf bpf: Add __bpf_stdout__ support
Date: Fri, 8 Apr 2016 15:07:21 +0000 [thread overview]
Message-ID: <1460128045-97310-1-git-send-email-wangnan0@huawei.com> (raw)
Hi Arnaldo,
Following your suggestion, patch 3-4 in this patch set add __bpf_stdout__
support. If a map is called __bpf_stdout__, perf will create a bpf-output
event and attach to it automatically. Don't need to setup bpf output event
in cmdline explicitly.
# perf record -e ./test_bpf_trace.c usleep 100000
# ~/perf script
usleep 25656 [003] 264724.900051: 0 __bpf_stdout__: ffffffff810eb9a1 sys_nanosleep (/lib/modules
BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a
0008: 42 50 46 20 65 76 65 6e BPF even
0010: 74 21 00 00 t!..
BPF string: "Raise a BPF event!"
usleep 25656 [003] 264725.000112: 0 __bpf_stdout__: ffffffff8105d609 kretprobe_trampoline_holder
BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a
0008: 42 50 46 20 65 76 65 6e BPF even
0010: 74 21 00 00 t!..
BPF string: "Raise a BPF event!"
Wang Nan (4):
perf trace: Improve error message when receive non-tracepoint events
perf trace: Print content of bpf-output event
perf bpf: Clone bpf stdout events in multiple bpf scripts
perf bpf: Automatically create bpf-output event __bpf_stdout__
tools/perf/builtin-record.c | 8 +++
tools/perf/builtin-trace.c | 33 +++++++++-
tools/perf/util/bpf-loader.c | 143 +++++++++++++++++++++++++++++++++++++++++++
tools/perf/util/bpf-loader.h | 19 ++++++
4 files changed, 202 insertions(+), 1 deletion(-)
--
1.8.3.4
next reply other threads:[~2016-04-08 15:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 15:07 Wang Nan [this message]
2016-04-08 15:07 ` [PATCH 1/4] perf trace: Improve error message when receive non-tracepoint events Wang Nan
2016-04-08 15:22 ` Arnaldo Carvalho de Melo
2016-04-08 16:12 ` Wangnan (F)
2016-04-08 17:33 ` Arnaldo Carvalho de Melo
2016-04-08 15:07 ` [PATCH 2/4] perf trace: Print content of bpf-output event Wang Nan
2016-04-08 15:55 ` Wangnan (F)
2016-04-08 17:25 ` Arnaldo Carvalho de Melo
2016-04-08 15:07 ` [PATCH 3/4] perf bpf: Clone bpf stdout events in multiple bpf scripts Wang Nan
2016-04-08 17:35 ` Arnaldo Carvalho de Melo
2016-04-13 7:22 ` [tip:perf/core] " tip-bot for Wang Nan
2016-04-08 15:07 ` [PATCH 4/4] perf bpf: Automatically create bpf-output event __bpf_stdout__ Wang Nan
2016-04-08 17:54 ` Arnaldo Carvalho de Melo
2016-04-13 7:22 ` [tip:perf/core] " tip-bot for 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=1460128045-97310-1-git-send-email-wangnan0@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=pi3orama@163.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).