Re: [PATCH] perf build: Fix libbabeltrace detection

From: Jiri Olsa
Date: Thu Mar 26 2015 - 05:26:14 EST


On Tue, Mar 10, 2015 at 10:44:00AM -0400, Jérémie Galarneau wrote:
> On Tue, Mar 10, 2015 at 10:11 AM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
> > On Tue, Mar 10, 2015 at 11:01:34AM -0300, Arnaldo Carvalho de Melo wrote:
> >> Em Tue, Mar 10, 2015 at 01:00:35PM +0100, Jiri Olsa escreveu:
> >> > On Mon, Mar 09, 2015 at 08:28:45PM -0300, Arnaldo Carvalho de Melo wrote:
> >> > > Em Mon, Mar 09, 2015 at 08:11:19PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> > > > Em Mon, Mar 09, 2015 at 06:51:21PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> > > [root@zoo ~]# find /opt/libbabeltrace/include/babeltrace/ -type f | xargs grep bt_ctf_stream_class_get_packet_context_type
> >> > > /opt/libbabeltrace/include/babeltrace/ctf-ir/stream-class.h:extern struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(
> >>
> >> > > That seems to be included from the file included in the feature test code :-\
> >> > > Really ran out of time now...
> >>
> >> > ouch, thanks a lot for debugging.. the reason is indeed the -Werror added by:
> >> > b49f1a4be701 perf tools: Improve feature test debuggability
> >>
> >> > following patch seems to fix this for me
> >> > ---
> >> > Following patch added -Werror for feature builds:
> >> > b49f1a4be701 perf tools: Improve feature test debuggability
> >>
> >> > and broke libbabeltrace feature build, because it was including
> >> > wrong header and gcc couldn't find the used symbol definition.
> >>
> >> > Adding proper header and keeping the old one as it is needed
> >> > also (libbabeltrace quirk).
> >>
> >> > +++ b/tools/perf/config/feature-checks/test-libbabeltrace.c
> >> > #include <babeltrace/ctf-writer/writer.h>
> >> > +#include <babeltrace/ctf-ir/stream-class.h>
> >>
> >> Right, that was the fix I found as well, well, I was trying to include
> >> _just_ babeltrace/ctf-ir/stream-class.h, but that is buggy in that it
> >> doesn't include the header file with the uint32_t and int64_t types:
> >
> > yep, thats the 'libbabeltrace quirk' I mentioned in the changelog ;-)
> >
>
> Seems I missed that being discussed. Fixed in Babeltrace master as of 48d711aa2.
>

hi,
that seems to work, but I could now load ctf trace data only in babeltrace.
I've got following error in tracecompas while trying to load the trace:

"No trace types found to match location /tmp/ctf-data/metadata"

but I might have old version of tracecompas and Im little fuzzy
on how to upgrade to new one.. CC-ing tracecompas guys ;-)

for anyone interested, the latest perf ctf code is in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/ctf branch

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/