perf beauty: Update copy of linux/socket.h with the kernel sources
...
To pick the changes in:
a6a6fe27ba
("net/smc: Dynamic control handshake limitation by socket options")
This automagically adds support for the SOL_MNC socket level:
$ diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
--- tools/perf/trace/beauty/include/linux/socket.h 2022-03-14 17:55:22.277148656 -0300
+++ include/linux/socket.h 2022-03-27 19:12:48.908250063 -0300
@@ -366,6 +366,7 @@
#define SOL_XDP 283
#define SOL_MPTCP 284
#define SOL_MCTP 285
+#define SOL_SMC 286
/* IPX options */
#define IPX_TYPE 1
$ tools/perf/trace/beauty/socket.sh > before
$ cp include/linux/socket.h tools/perf/trace/beauty/include/linux/socket.h
$ tools/perf/trace/beauty/socket.sh > after
$ diff -u before after
--- before 2022-03-29 11:47:56.390258780 -0300
+++ after 2022-03-29 11:48:03.158436189 -0300
@@ -67,6 +67,7 @@
[283] = "XDP",
[284] = "MPTCP",
[285] = "MCTP",
+ [286] = "SMC",
};
DEFINE_STRARRAY(socket_level, "SOL_");
$
This will allow 'perf trace' to translate 286 into "SMC" as is done with
the other socket levels:
# perf trace -e setsockopt --max-events 4
344.916 ( 0.003 ms): Socket Thread/3816 setsockopt(fd: 168, level: TCP, optname: 5, optval: 0x7f5797b9c4f8, optlen: 4) = 0
344.920 ( 0.002 ms): Socket Thread/3816 setsockopt(fd: 168, level: TCP, optname: 6, optval: 0x7f5797b9c4f4, optlen: 4) = 0
1246.974 ( 0.010 ms): systemd-resolv/1128 setsockopt(fd: 22, level: IP, optname: 11, optval: 0x7ffc96cd7244, optlen: 4) = 0
1246.986 ( 0.002 ms): systemd-resolv/1128 setsockopt(fd: 22, level: IP, optname: 8, optval: 0x7ffc96cd7264, optlen: 4) = 0
This addresses this perf build warning:
Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: D. Wythe <alibuda@linux.alibaba.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/YkMdpzzjPu5VZtW3@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>