Re: [PATCH 2/3] perf build: Use libtraceevent from the system

From: Arnaldo Carvalho de Melo
Date: Wed Dec 07 2022 - 12:32:01 EST


Em Wed, Dec 07, 2022 at 02:27:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Dec 07, 2022 at 07:08:28PM +0530, Athira Rajeev escreveu:
> > > On 06-Dec-2022, at 11:01 PM, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Can you try again? tmp.perf/core? That "tmp." part means its a force
> pushed branch, so I just force pushed with some arch specific fixes, now
> I'm down to (removing the successful builds and unrelated failures, now
> related to libbpf's F_DUPFD_CLOEXEC kaboom):
>
> 14 8.49 ubuntu:18.04-x-s390 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> tests/parse-events.c:1893:12: error: 'test__checkevent_tracepoint' undeclared here (not in a function); did you mean 'test__checkevent_breakpoint'?
> .check = test__checkevent_tracepoint,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> test__checkevent_breakpoint
> /git/perf-6.1.0-rc6/tools/build/Makefile.build:139: recipe for target 'tests' failed
> make[3]: *** [tests] Error 2

This should fix the above:


⬢[acme@toolbox perf]$ vim tools/perf/tests/parse-events.c
⬢[acme@toolbox perf]$ git diff
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index dcbfb93287e80e78..bebb677682deff98 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1887,7 +1887,7 @@ static const struct evlist_test test__events[] = {
.check = test__checkevent_breakpoint_len_rw_modifier,
/* 4 */
},
-#if defined(__s390x__)
+#if defined(__s390x__) and defined(HAVE_LIBTRACEEVENT)
{
.name = "kvm-s390:kvm_s390_create_vm",
.check = test__checkevent_tracepoint,
⬢[acme@toolbox perf]$