Commit 43cbcd8a authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar
Browse files

perf_counter tools: Share rbtree.with the kernel



The tools/perf/util/rbtree.c copy already drifted by three
csets:

 4b324126
 4c601178
 16c047ad

So remove the copy and use the lib/rbtree.c directly, sharing
the source code while still generating a separate object file,
since tools/perf uses a far more agressive -O6 switch.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090701152837.GG15682@ghostprotocols.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 73c24cb8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
# Those must not be GNU-specific; they are shared with perl/ which may
# be built by a different compiler. (Note that this is an artifact now
# but it still might be nice to keep that distinction.)
BASIC_CFLAGS =
BASIC_CFLAGS = -Iutil/include
BASIC_LDFLAGS =

# Guard against environment variables
@@ -289,10 +289,10 @@ export PERL_PATH
LIB_FILE=libperf.a

LIB_H += ../../include/linux/perf_counter.h
LIB_H += ../../include/linux/rbtree.h
LIB_H += perf.h
LIB_H += util/types.h
LIB_H += util/list.h
LIB_H += util/rbtree.h
LIB_H += util/levenshtein.h
LIB_H += util/parse-options.h
LIB_H += util/parse-events.h
@@ -691,6 +691,9 @@ builtin-init-db.o: builtin-init-db.c PERF-CFLAGS
util/config.o: util/config.c PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

util/rbtree.o: ../../lib/rbtree.c PERF-CFLAGS
	$(QUIET_CC)$(CC) -o util/rbtree.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

perf-%$X: %.o $(PERFLIBS)
	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)

+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include "util/color.h"
#include "util/list.h"
#include "util/cache.h"
#include "util/rbtree.h"
#include <linux/rbtree.h>
#include "util/symbol.h"
#include "util/string.h"

+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include "util/color.h"
#include "util/list.h"
#include "util/cache.h"
#include "util/rbtree.h"
#include <linux/rbtree.h>
#include "util/symbol.h"
#include "util/string.h"
#include "util/callchain.h"
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include "util/symbol.h"
#include "util/color.h"
#include "util/util.h"
#include "util/rbtree.h"
#include <linux/rbtree.h>
#include "util/parse-options.h"
#include "util/parse-events.h"

+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

#include "../perf.h"
#include "list.h"
#include "rbtree.h"
#include <linux/rbtree.h>
#include "symbol.h"


Loading