Re: [PATCH v2 05/10] perf trace: Add a new argument to trace__btf_scnprintf()

From: Arnaldo Carvalho de Melo
Date: Thu Aug 22 2024 - 14:14:03 EST


On Thu, Aug 22, 2024 at 03:00:30PM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, Aug 15, 2024 at 09:36:21AM +0800, Howard Chu wrote:
> > Pass the struct syscall_arg, so that we can use the augmented_arg later
> > in the struct augmentation.
>
> Breaks the build with:
>
> builtin-trace.c: In function ‘trace__btf_scnprintf’:
> builtin-trace.c:1011:78: error: unused parameter ‘arg’ [-Werror=unused-parameter]
> 1011 | size_t size, int val, struct syscall_arg *arg, char *type)
> | ~~~~~~~~~~~~~~~~~~~~^~~
> LD /tmp/build/perf-tools-next/util/perf-util-in.o
> LD /tmp/build/perf-tools-next/perf-util-in.o
> AR /tmp/build/perf-tools-next/libperf-util.a
> GEN /tmp/build/perf-tools-next/python/perf.cpython-312-x86_64-linux-gnu.so
> cc1: all warnings being treated as errors
>
> So we either use __maybe_unused at this point or combine it with the
> patch where it really gets used. I think the later is better, will do.

So here what I think we should do is to use the patch below, ok? I'm
continuing...

- Arnaldo

---