Re: [External] Re: [PATCH v2 2/2] perf evsel: Use evsel__name_is() helper

From: Yang Jihong
Date: Wed Apr 03 2024 - 03:45:37 EST


Hello,

On 4/3/24 05:07, Arnaldo Carvalho de Melo wrote:
On Mon, Apr 01, 2024 at 02:27:24PM +0800, Yang Jihong wrote:
Code cleanup, replace strcmp(evsel__name(evsel, {NAME})) with
evsel__name_is() helper.

No functional change.

Well, its not building:

builtin-trace.c: In function ‘cmd_trace’:
builtin-trace.c:4919:90: error: macro "assert" passed 2 arguments, but takes just 1
4919 | assert(evsel__name_is(trace.syscalls.events.bpf_output), "__augmented_syscalls__");
| ^
In file included from /home/acme/git/perf-tools-next/tools/include/linux/kernel.h:7,
from /home/acme/git/perf-tools-next/tools/include/linux/refcount.h:42,
from util/cgroup.h:6,
from builtin-trace.c:29:
/usr/include/assert.h:50: note: macro "assert" defined here

I'll fix it, but please test build things next time.

Sorry. I compiled it in a new environment before. This environment does not support bpf skel, and the modified part of the code is included in HAVE_BPF_SKEL, so I did not find this problem when I compiled it in my environment.


Thanks for the correction. will confirm whether the modified code is actually compiled next time.


Thanks,
Yang