perf: Handle new rbtree implementation
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Tue, 9 Oct 2012 18:01:56 +0000 (20:01 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Oct 2012 01:12:09 +0000 (10:12 +0900)
Perf build fails with the new rbtree implementation:

  ../../lib/rbtree.c:24:36: fatal error: linux/rbtree_augmented.h: No such file or directory compilation terminated.

Fix by updating the Makefile and adding a btree_augmented.h
wrapper.

Reported-and-tested-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Borislav Petkov <bp@amd64.org>
Link: http://lkml.kernel.org/r/20121009180156.GA245@x4
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/perf/Makefile
tools/perf/util/include/linux/rbtree_augmented.h [new file with mode: 0644]

index 86258c2a2c23d94a8714e327a771b20f00a8461f..9546ff58f0242735298f8d16a2c38282829f4688 100644 (file)
@@ -268,6 +268,7 @@ LIB_H += util/include/linux/magic.h
 LIB_H += util/include/linux/poison.h
 LIB_H += util/include/linux/prefetch.h
 LIB_H += util/include/linux/rbtree.h
+LIB_H += util/include/linux/rbtree_augmented.h
 LIB_H += util/include/linux/string.h
 LIB_H += util/include/linux/types.h
 LIB_H += util/include/linux/linkage.h
@@ -906,7 +907,7 @@ $(OUTPUT)ui/browsers/map.o: ui/browsers/map.c $(OUTPUT)PERF-CFLAGS
        $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
 
 $(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
-       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
+       $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Wno-unused-parameter -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
 
 $(OUTPUT)util/parse-events.o: util/parse-events.c $(OUTPUT)PERF-CFLAGS
        $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Wno-redundant-decls $<
diff --git a/tools/perf/util/include/linux/rbtree_augmented.h b/tools/perf/util/include/linux/rbtree_augmented.h
new file mode 100644 (file)
index 0000000..9d6fcdf
--- /dev/null
@@ -0,0 +1,2 @@
+#include <stdbool.h>
+#include "../../../../include/linux/rbtree_augmented.h"