[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-m2hmxqrckxxw2ciki0tu889u@git.kernel.org>
Date: Tue, 30 Jul 2019 11:02:22 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, acme@...hat.com, hpa@...or.com, jolsa@...nel.org,
tglx@...utronix.de, adrian.hunter@...el.com, lclaudio@...hat.com,
linux-kernel@...r.kernel.org, namhyung@...nel.org
Subject: [tip:perf/core] perf trace beauty: Beautify bind's sockaddr arg
Commit-ID: 247dd65b909f1cd62a178febe3f6f8d5efdd7dd2
Gitweb: https://git.kernel.org/tip/247dd65b909f1cd62a178febe3f6f8d5efdd7dd2
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 16 Jul 2019 17:38:26 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 29 Jul 2019 18:34:42 -0300
perf trace beauty: Beautify bind's sockaddr arg
By reusing the "connect" BPF collector.
Testing it system wide and stopping/starting sshd:
# perf trace -e bind
LLVM: dumping /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o
DNS Res~er #18/15132 bind(243, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #19/4833 bind(247, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #19/4833 bind(238, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #18/15132 bind(243, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #18/10327 bind(258, { .family: PF_NETLINK }, 12) = 0
:6507/6507 bind(24, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #19/4833 bind(238, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #18/15132 bind(242, { .family: PF_NETLINK }, 12) = 0
sshd/6514 bind(3, { .family: PF_NETLINK }, 12) = 0
sshd/6514 bind(5, { .family: PF_INET, port: 22, addr: 0.0.0.0 }, 16) = 0
sshd/6514 bind(7, { .family: PF_INET6, port: 22, addr: :: }, 28) = 0
DNS Res~er #18/10327 bind(229, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #18/15132 bind(231, { .family: PF_NETLINK }, 12) = 0
DNS Res~er #19/4833 bind(229, { .family: PF_NETLINK }, 12) = 0
^C#
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-m2hmxqrckxxw2ciki0tu889u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-trace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 010aa9e9a561..d403b09812d1 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -710,8 +710,10 @@ static struct syscall_fmt {
.arg = { [0] = { .scnprintf = SCA_X86_ARCH_PRCTL_CODE, /* code */ },
[1] = { .scnprintf = SCA_PTR, /* arg2 */ }, }, },
{ .name = "bind",
+ .bpf_prog_name = { .sys_enter = "!syscalls:sys_enter_connect", },
.arg = { [0] = { .scnprintf = SCA_INT, /* fd */ },
- [1] = { .scnprintf = SCA_SOCKADDR, /* umyaddr */ }, }, },
+ [1] = { .scnprintf = SCA_SOCKADDR, /* umyaddr */ },
+ [2] = { .scnprintf = SCA_INT, /* addrlen */ }, }, },
{ .name = "bpf",
.arg = { [0] = STRARRAY(cmd, bpf_cmd), }, },
{ .name = "brk", .hexret = true,
Powered by blists - more mailing lists