Re: [PATCH 1/1] perf build: Require at least clang 16.0.6 to build BPF skeletons
From: James Clark
Date: Thu Oct 10 2024 - 05:05:47 EST
On 10/10/2024 2:20 am, Arnaldo Carvalho de Melo wrote:
On Wed, Oct 9, 2024, 10:01 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
On Tue, Oct 08, 2024 at 12:27:24AM -0700, Howard Chu wrote:
Hi Alan, Arnaldo and James,
This problem was solved in [PATCH 0/2] perf trace: Fix support for the
new BPF feature in clang 12 (Link:
https://lore.kernel.org/linux-perf-users/20241007051414.2995674-1-howardchu95@xxxxxxxxx/T/#t
),
sorry I forgot to cc you two.
Alan's thought was correct. Thank you so much! :)
It'd be great if any of you can test this change. Now I only have
machines with clang 16.
I'll test this tomorrow.
- Arnaldo
Thanks,
Namhyung
Tested with clang 15:
$ sudo perf trace -e write --max-events=100 -- echo hello
0.000 ( 0.014 ms): echo/834165 write(fd: 1, buf: hello\10, count: 6)
=
Tested-by: James Clark <james.clark@xxxxxxxxxx>
Unrelated to this change, I noticed that with older clangs or with
BUILD_BPF_SKEL=0 that commit b257fac12f38 ("perf trace: Pretty print
buffer data") changes the buffer address to print nothing, and the '6'
return value is missing. Not sure if this was intended or not:
$ sudo perf trace -e write --max-events=100 -- echo hello
Before:
0.000 ( 0.009 ms): echo/772951 write(fd: 1, buf: 0x58c415257440,
count: 6) = 6
After:
0.000 ( 0.009 ms): echo/760370 write(fd: 1, buf: , count: 6)
=
Thanks
James