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

From: Ian Rogers
Date: Tue Dec 13 2022 - 17:48:06 EST


On Tue, Dec 13, 2022 at 2:34 PM Arnaldo Carvalho de Melo
<arnaldo.melo@xxxxxxxxx> wrote:
>
>
>
> On December 13, 2022 7:09:07 PM GMT-03:00, Ian Rogers <irogers@xxxxxxxxxx> wrote:
> >Thanks Athira and Arnaldo. It is a little strange to me to be using
> >the shell to do a version number test. The intent was to be doing
> >these in the code:
> >#if LIBRTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)
> >vs
> >...
> >LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE := $(shell expr 1 \*
> >255 \* 255 + 5 \* 255 + 0) # 1.5.0
> >ifeq ($(shell test $(LIBTRACEEVENT_VERSION_CPP) -gt
> >$(LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE); echo $$?),0)
> >CFLAGS += -DHAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
> >endif
> >...
> >#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
> >I'm a little selfish as I'm maintaining a bazel build and a single
> >version number to maintain is easier than lots of HAVE_... tests. I'm
> >happy to follow Arnaldo's lead. I think the test should also be
> >greater-equal rather than greater-than:
> >https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/tree/include/traceevent/event-parse.h?h=libtraceevent-v1.5#n128
>
> I'll fix that, and in a case like this please consider to send a patch with your preference, I'd happily
> graft it.
>
> - Arnaldo

I can fix it. I can fold it in with:
https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@xxxxxxxxxx/
which I mentioned in this thread.

Thanks,
Ian

> >