Re: [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support

From: Arnaldo Carvalho de Melo
Date: Mon Mar 09 2015 - 19:29:10 EST


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:
> > Doesn't work as well...
> >
> > :-\
> >
> > Will try debugging...
>
> So I tried checkout out before Ingo's changes to libbabeltrace detection, i.e.:
>
> [acme@zoo linux]$ git checkout -b ttmp 9a75606ca06d94aab1ed0dbe96935e3f89dfb81c
>
> And it works:

So it seems its due to the -Werror

> [acme@zoo linux]$ git bisect bad
> b49f1a4be701c2386ccc7496dc8442cf26424d5c is the first bad commit
> commit b49f1a4be701c2386ccc7496dc8442cf26424d5c
> Author: Ingo Molnar <mingo@xxxxxxxxxx>
> Date: Sat Feb 28 10:16:27 2015 +0100
>
> perf tools: Improve feature test debuggability
>
> Certain feature tests fail with link errors:
>
> --------------------------------------------------------------
>
> Ran out of time, will continue later/tomorrow.

[acme@zoo linux]$ git diff
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e2350ada6ccd..d46e0ef45417 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -184,7 +184,7 @@ endif

feature_check = $(eval $(feature_check_code))
define feature_check_code
- feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/dev/null 2>/dev/null && echo 1 ||
+ feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/tmp/output-$(1) 2>/dev/null && ec
endef

feature_set = $(eval $(feature_set_code))
[acme@zoo linux]$ cd /home/git/linux/tools/perf/config/feature-checks
[acme@zoo feature-checks]$ gcc -MD -I/opt/libbabeltrace//include -Wall -Werror -o /tmp/build/perf/config/feature-checks/test-libbabeltrace.bin test-libbabeltrace.c -Wl,-z,noexecstack -L/opt/libbabeltrace//lib -lbabeltrace-ctf
test-libbabeltrace.c: In function âmainâ:
test-libbabeltrace.c:6:2: error: implicit declaration of function âbt_ctf_stream_class_get_packet_context_typeâ [-Werror=implicit-function-declaration]
bt_ctf_stream_class_get_packet_context_type((void *) 0);
^
cc1: all warnings being treated as errors
[acme@zoo feature-checks]$

[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: * bt_ctf_stream_class_get_packet_context_type: get the stream class' packet
/opt/libbabeltrace/include/babeltrace/ctf-ir/stream-class.h:extern struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(
[root@zoo ~]#

That seems to be included from the file included in the feature test code :-\

Really ran out of time now...

- Arnaldo
--
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/