Re: [PATCH net-next] tools: Fix MSG_SPLICE_PAGES build error in trace tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

Thank you for the patch!

On 26/06/2023 15:20, David Howells wrote:
> The following error is being seen the perf tools because they have their
> own copies of a lot of kernel headers:
> 
> In file included from builtin-trace.c:907:
> trace/beauty/msg_flags.c: In function 'syscall_arg__scnprintf_msg_flags':
> trace/beauty/msg_flags.c:28:21: error: 'MSG_SPLICE_PAGES' undeclared (first use in this function)
>    28 |         if (flags & MSG_##n) { \
>       |                     ^~~~
> trace/beauty/msg_flags.c:50:9: note: in expansion of macro 'P_MSG_FLAG'
>    50 |         P_MSG_FLAG(SPLICE_PAGES);
>       |         ^~~~~~~~~~
> trace/beauty/msg_flags.c:28:21: note: each undeclared identifier is reported only once for each function it appears in
>    28 |         if (flags & MSG_##n) { \
>       |                     ^~~~
> trace/beauty/msg_flags.c:50:9: note: in expansion of macro 'P_MSG_FLAG'
>    50 |         P_MSG_FLAG(SPLICE_PAGES);
>       |         ^~~~~~~~~~
> 
> Fix this by (1) adding MSG_SPLICE_PAGES to
> tools/perf/trace/beauty/include/linux/socket.h - which looks like it ought
> to work, but doesn't

Commit 58277f502f42 ("perf trace beauty: Add script to autogenerate
socket families table") seems to suggest this file is only used by
tools/perf/trace/beauty/socket.sh script (and later by sockaddr.sh) but
not by msg_flags.c.

If I'm not mistaken, it is then not required to modify this file to fix
the issue you mention.

But it is still needed to modify it to avoid another 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
So another issue. When checking the differences between the two files, I
see there are still also other modifications to import, e.g. it looks
like you also added MSG_INTERNAL_SENDMSG_FLAGS macro in socket.h. Do you
plan to fix that too?
It might be clearer to have all these modifications of
tools/perf/trace/beauty/include/linux/socket.h in a separated commit as
it is fixing a different issue but that's a detail. As long as we can
have perf compiling without issues when using the net-next tree :)

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux