From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexei Starovoitov <ast@plumgrid.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 1/8] perf trace: Add cmd string table to decode sys_bpf first arg
Date: Thu, 29 Oct 2015 20:05:30 -0300 [thread overview]
Message-ID: <1446159937-28763-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1446159937-28763-1-git-send-email-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
# perf trace -e bpf perf record -e /tmp/foo.o -a
362.779 (0.130 ms): perf/3451 bpf(cmd: PROG_LOAD, uattr: 0x7ffe9a6825d0, size: 48) = 3
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2b0nknu53baz9e0wj4thcdd8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 93b80f12f35e..c783d8fd3a80 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -585,6 +585,12 @@ static size_t syscall_arg__scnprintf_futex_op(char *bf, size_t size, struct sysc
#define SCA_FUTEX_OP syscall_arg__scnprintf_futex_op
+static const char *bpf_cmd[] = {
+ "MAP_CREATE", "MAP_LOOKUP_ELEM", "MAP_UPDATE_ELEM", "MAP_DELETE_ELEM",
+ "MAP_GET_NEXT_KEY", "PROG_LOAD",
+};
+static DEFINE_STRARRAY(bpf_cmd);
+
static const char *epoll_ctl_ops[] = { "ADD", "DEL", "MOD", };
static DEFINE_STRARRAY_OFFSET(epoll_ctl_ops, 1);
@@ -1011,6 +1017,7 @@ static struct syscall_fmt {
.arg_scnprintf = { [0] = SCA_FILENAME, /* filename */
[1] = SCA_ACCMODE, /* mode */ }, },
{ .name = "arch_prctl", .errmsg = true, .alias = "prctl", },
+ { .name = "bpf", .errmsg = true, STRARRAY(0, cmd, bpf_cmd), },
{ .name = "brk", .hexret = true,
.arg_scnprintf = { [0] = SCA_HEX, /* brk */ }, },
{ .name = "chdir", .errmsg = true,
--
2.1.0
next prev parent reply other threads:[~2015-10-29 23:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 23:05 [GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-29 23:05 ` Arnaldo Carvalho de Melo [this message]
2015-10-29 23:05 ` [PATCH 2/8] perf script: Enable printing of branch stack Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 3/8] perf tools: Make sure fixdep is built before libbpf Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 4/8] perf bpf: Attach eBPF filter to perf event Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 5/8] perf record: Add clang options for compiling BPF scripts Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 6/8] perf tools: Compile scriptlets to BPF objects when passing '.c' to --event Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 7/8] tools build: Fix libiberty feature detection Arnaldo Carvalho de Melo
2015-10-29 23:05 ` [PATCH 8/8] perf unwind: Pass symbol source to libunwind Arnaldo Carvalho de Melo
2015-10-30 9:10 ` [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar
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=1446159937-28763-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ast@plumgrid.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--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).