Re: [PATCH 1/1] perf trace: Support collecting 'union's with the BPF augmenter
From: Arnaldo Carvalho de Melo
Date: Tue Sep 10 2024 - 16:31:25 EST
On Tue, Sep 10, 2024 at 05:28:34PM -0300, Arnaldo Carvalho de Melo wrote:
> On Tue, Sep 10, 2024 at 09:16:56AM -0700, Howard Chu wrote:
> > Hello Arnaldo,
> >
> > LGTM.
>
> Taking that as an Acked-by, as per the Documentation/ submitting
> patches docs, next time consider providing an:
> > On Tue, Sep 10, 2024 at 6:27 AM Arnaldo Carvalho de Melo
> > <arnaldo.melo@xxxxxxxxx> wrote:
> > > @@ -2365,8 +2365,7 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
> > > default_scnprintf = sc->arg_fmt[arg.idx].scnprintf;
> > >
> > > if (trace->force_btf ||
> > > - (default_scnprintf == NULL ||
> > > - (default_scnprintf == SCA_PTR && strstr(field->type, "struct")))) {
> > > + (default_scnprintf == NULL || (default_scnprintf == SCA_PTR))) {
> >
> > Can we discard the parenthesis surrounding the 'default_scnprintf == SCA_PTR'?
> >
> > (default_scnprintf == NULL || default_scnprintf == SCA_PTR)) {
Done:
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d28a56cc171b2b2e..ed4c5e637e24eed0 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2364,8 +2364,7 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
default_scnprintf = sc->arg_fmt[arg.idx].scnprintf;
- if (trace->force_btf ||
- (default_scnprintf == NULL || (default_scnprintf == SCA_PTR))) {
+ if (trace->force_btf || default_scnprintf == NULL || default_scnprintf == SCA_PTR) {
btf_printed = trace__btf_scnprintf(trace, &arg, bf + printed,
size - printed, val, field->type);
if (btf_printed) {