* [PATCH] [1/2] perf: Make location of kernel source configurable
@ 2009-12-06 14:07 Andi Kleen
2009-12-06 14:07 ` [PATCH] [2/2] perf: allow installing as perf-versionnumber Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Andi Kleen @ 2009-12-06 14:07 UTC (permalink / raw)
To: a.p.zijlstra, mingo, fweisbec, linux-kernel
tools/perf has no support for separate object directories
and lots of hard coded paths assuming that the kernel source
is always in ../..
As a first step of compiling it separately without messing
up clean source trees allow to configure the kernel source
location using a KERNELSRC variable
This allows at least to copy the whole tools/perf
directory elsewhere and build it separately.
The default is still ../.., so for a standard build
nothing changes
This also removes a lot of ugly ../.. from the source.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/Makefile | 12 +++++++-----
tools/perf/perf.h | 16 ++++++++--------
tools/perf/util/header.h | 2 +-
tools/perf/util/include/linux/list.h | 2 +-
tools/perf/util/include/linux/poison.h | 2 +-
tools/perf/util/include/linux/rbtree.h | 2 +-
tools/perf/util/util.h | 2 +-
7 files changed, 20 insertions(+), 18 deletions(-)
Index: linux-2.6.32-ak/tools/perf/Makefile
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/Makefile
+++ linux-2.6.32-ak/tools/perf/Makefile
@@ -146,6 +146,8 @@ all::
# your external grep (e.g., if your system lacks grep, if its grep is
# broken, or spawning external process is slower than built-in grep perf has).
+KERNELSRC := ../..
+
PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@$(SHELL_PATH) util/PERF-VERSION-GEN
-include PERF-VERSION-FILE
@@ -259,7 +261,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powe
# 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 = -Iutil/include
+BASIC_CFLAGS = -Iutil/include -I $(KERNELSRC)
BASIC_LDFLAGS =
# Guard against environment variables
@@ -324,9 +326,9 @@ export PERL_PATH
LIB_FILE=libperf.a
-LIB_H += ../../include/linux/perf_event.h
-LIB_H += ../../include/linux/rbtree.h
-LIB_H += ../../include/linux/list.h
+LIB_H += $(KERNELSRC)/include/linux/perf_event.h
+LIB_H += $(KERNELSRC)/include/linux/rbtree.h
+LIB_H += $(KERNELSRC)/include/linux/list.h
LIB_H += util/include/linux/list.h
LIB_H += perf.h
LIB_H += util/types.h
@@ -784,7 +786,7 @@ builtin-init-db.o: builtin-init-db.c PER
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
+util/rbtree.o: $(KERNELSRC)/lib/rbtree.c PERF-CFLAGS
$(QUIET_CC)$(CC) -o util/rbtree.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
perf-%$X: %.o $(PERFLIBS)
Index: linux-2.6.32-ak/tools/perf/perf.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/perf.h
+++ linux-2.6.32-ak/tools/perf/perf.h
@@ -2,31 +2,31 @@
#define _PERF_PERF_H
#if defined(__i386__)
-#include "../../arch/x86/include/asm/unistd.h"
+#include "arch/x86/include/asm/unistd.h"
#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#endif
#if defined(__x86_64__)
-#include "../../arch/x86/include/asm/unistd.h"
+#include "arch/x86/include/asm/unistd.h"
#define rmb() asm volatile("lfence" ::: "memory")
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#endif
#ifdef __powerpc__
-#include "../../arch/powerpc/include/asm/unistd.h"
+#include "arch/powerpc/include/asm/unistd.h"
#define rmb() asm volatile ("sync" ::: "memory")
#define cpu_relax() asm volatile ("" ::: "memory");
#endif
#ifdef __s390__
-#include "../../arch/s390/include/asm/unistd.h"
+#include "arch/s390/include/asm/unistd.h"
#define rmb() asm volatile("bcr 15,0" ::: "memory")
#define cpu_relax() asm volatile("" ::: "memory");
#endif
#ifdef __sh__
-#include "../../arch/sh/include/asm/unistd.h"
+#include "arch/sh/include/asm/unistd.h"
#if defined(__SH4A__) || defined(__SH5__)
# define rmb() asm volatile("synco" ::: "memory")
#else
@@ -36,13 +36,13 @@
#endif
#ifdef __hppa__
-#include "../../arch/parisc/include/asm/unistd.h"
+#include "arch/parisc/include/asm/unistd.h"
#define rmb() asm volatile("" ::: "memory")
#define cpu_relax() asm volatile("" ::: "memory");
#endif
#ifdef __sparc__
-#include "../../arch/sparc/include/asm/unistd.h"
+#include "arch/sparc/include/asm/unistd.h"
#define rmb() asm volatile("":::"memory")
#define cpu_relax() asm volatile("":::"memory")
#endif
@@ -52,7 +52,7 @@
#include <sys/types.h>
#include <sys/syscall.h>
-#include "../../include/linux/perf_event.h"
+#include "include/linux/perf_event.h"
#include "util/types.h"
/*
Index: linux-2.6.32-ak/tools/perf/util/header.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/util/header.h
+++ linux-2.6.32-ak/tools/perf/util/header.h
@@ -1,7 +1,7 @@
#ifndef _PERF_HEADER_H
#define _PERF_HEADER_H
-#include "../../../include/linux/perf_event.h"
+#include "include/linux/perf_event.h"
#include <sys/types.h>
#include "types.h"
Index: linux-2.6.32-ak/tools/perf/util/include/linux/list.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/util/include/linux/list.h
+++ linux-2.6.32-ak/tools/perf/util/include/linux/list.h
@@ -1,4 +1,4 @@
-#include "../../../../include/linux/list.h"
+#include "include/linux/list.h"
#ifndef PERF_LIST_H
#define PERF_LIST_H
Index: linux-2.6.32-ak/tools/perf/util/include/linux/poison.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/util/include/linux/poison.h
+++ linux-2.6.32-ak/tools/perf/util/include/linux/poison.h
@@ -1 +1 @@
-#include "../../../../include/linux/poison.h"
+#include "include/linux/poison.h"
Index: linux-2.6.32-ak/tools/perf/util/include/linux/rbtree.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/util/include/linux/rbtree.h
+++ linux-2.6.32-ak/tools/perf/util/include/linux/rbtree.h
@@ -1 +1 @@
-#include "../../../../include/linux/rbtree.h"
+#include "include/linux/rbtree.h"
Index: linux-2.6.32-ak/tools/perf/util/util.h
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/util/util.h
+++ linux-2.6.32-ak/tools/perf/util/util.h
@@ -77,7 +77,7 @@
#include <netdb.h>
#include <pwd.h>
#include <inttypes.h>
-#include "../../../include/linux/magic.h"
+#include "include/linux/magic.h"
#ifndef NO_ICONV
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] [2/2] perf: allow installing as perf-versionnumber 2009-12-06 14:07 [PATCH] [1/2] perf: Make location of kernel source configurable Andi Kleen @ 2009-12-06 14:07 ` Andi Kleen 2009-12-07 1:33 ` [PATCH] [1/2] perf: Make location of kernel source configurable Frederic Weisbecker 2009-12-07 6:18 ` Frederic Weisbecker 2 siblings, 0 replies; 8+ messages in thread From: Andi Kleen @ 2009-12-06 14:07 UTC (permalink / raw) To: a.p.zijlstra, mingo, fweisbec, linux-kernel Right now installing a given perf binary as perf-versionnumber doesn't work because perf internally tries to dispatch a "versionnumber" command. Add a special case to not dispatch commands starting with a digit. Signed-off-by: Andi Kleen <ak@linux.intel.com> --- tools/perf/perf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: linux-2.6.32-ak/tools/perf/perf.c =================================================================== --- linux-2.6.32-ak.orig/tools/perf/perf.c +++ linux-2.6.32-ak/tools/perf/perf.c @@ -441,8 +441,11 @@ int main(int argc, const char **argv) * * So we just directly call the internal command handler, and * die if that one cannot handle it. + * + * A special case is a digit option: this might be perf-versionnumber + * Just ignore that. */ - if (!prefixcmp(cmd, "perf-")) { + if (!prefixcmp(cmd, "perf-") && !isdigit(cmd[5])) { cmd += 5; argv[0] = cmd; handle_internal_command(argc, argv); ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-06 14:07 [PATCH] [1/2] perf: Make location of kernel source configurable Andi Kleen 2009-12-06 14:07 ` [PATCH] [2/2] perf: allow installing as perf-versionnumber Andi Kleen @ 2009-12-07 1:33 ` Frederic Weisbecker 2009-12-07 5:25 ` Ingo Molnar 2009-12-07 6:18 ` Frederic Weisbecker 2 siblings, 1 reply; 8+ messages in thread From: Frederic Weisbecker @ 2009-12-07 1:33 UTC (permalink / raw) To: Andi Kleen; +Cc: a.p.zijlstra, mingo, linux-kernel On Sun, Dec 06, 2009 at 03:07:30PM +0100, Andi Kleen wrote: > > tools/perf has no support for separate object directories > and lots of hard coded paths assuming that the kernel source > is always in ../.. > > As a first step of compiling it separately without messing > up clean source trees allow to configure the kernel source > location using a KERNELSRC variable > > This allows at least to copy the whole tools/perf > directory elsewhere and build it separately. > > The default is still ../.., so for a standard build > nothing changes > > This also removes a lot of ugly ../.. from the source. > > Signed-off-by: Andi Kleen <ak@linux.intel.com> It worry about that too. Acked-by: Frederic Weisbecker <fweisbec@gmail.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-07 1:33 ` [PATCH] [1/2] perf: Make location of kernel source configurable Frederic Weisbecker @ 2009-12-07 5:25 ` Ingo Molnar 2009-12-07 5:31 ` Frederic Weisbecker 0 siblings, 1 reply; 8+ messages in thread From: Ingo Molnar @ 2009-12-07 5:25 UTC (permalink / raw) To: Frederic Weisbecker; +Cc: Andi Kleen, a.p.zijlstra, linux-kernel * Frederic Weisbecker <fweisbec@gmail.com> wrote: > On Sun, Dec 06, 2009 at 03:07:30PM +0100, Andi Kleen wrote: > > > > tools/perf has no support for separate object directories > > and lots of hard coded paths assuming that the kernel source > > is always in ../.. > > > > As a first step of compiling it separately without messing > > up clean source trees allow to configure the kernel source > > location using a KERNELSRC variable > > > > This allows at least to copy the whole tools/perf > > directory elsewhere and build it separately. > > > > The default is still ../.., so for a standard build > > nothing changes > > > > This also removes a lot of ugly ../.. from the source. > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > > > It worry about that too. > > Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Frederic, mind queueing Andi's fix up in your tree and testing it there, before pushing it to me via the regular route? Thanks, Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-07 5:25 ` Ingo Molnar @ 2009-12-07 5:31 ` Frederic Weisbecker 0 siblings, 0 replies; 8+ messages in thread From: Frederic Weisbecker @ 2009-12-07 5:31 UTC (permalink / raw) To: Ingo Molnar; +Cc: Andi Kleen, a.p.zijlstra, linux-kernel On Mon, Dec 07, 2009 at 06:25:21AM +0100, Ingo Molnar wrote: > > * Frederic Weisbecker <fweisbec@gmail.com> wrote: > > > On Sun, Dec 06, 2009 at 03:07:30PM +0100, Andi Kleen wrote: > > > > > > tools/perf has no support for separate object directories > > > and lots of hard coded paths assuming that the kernel source > > > is always in ../.. > > > > > > As a first step of compiling it separately without messing > > > up clean source trees allow to configure the kernel source > > > location using a KERNELSRC variable > > > > > > This allows at least to copy the whole tools/perf > > > directory elsewhere and build it separately. > > > > > > The default is still ../.., so for a standard build > > > nothing changes > > > > > > This also removes a lot of ugly ../.. from the source. > > > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > > > > > > It worry about that too. > > > > Acked-by: Frederic Weisbecker <fweisbec@gmail.com> > > Frederic, mind queueing Andi's fix up in your tree and testing it there, > before pushing it to me via the regular route? > > Thanks, > > Ingo Sure. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-06 14:07 [PATCH] [1/2] perf: Make location of kernel source configurable Andi Kleen 2009-12-06 14:07 ` [PATCH] [2/2] perf: allow installing as perf-versionnumber Andi Kleen 2009-12-07 1:33 ` [PATCH] [1/2] perf: Make location of kernel source configurable Frederic Weisbecker @ 2009-12-07 6:18 ` Frederic Weisbecker 2009-12-07 7:07 ` Ingo Molnar 2 siblings, 1 reply; 8+ messages in thread From: Frederic Weisbecker @ 2009-12-07 6:18 UTC (permalink / raw) To: Andi Kleen; +Cc: a.p.zijlstra, mingo, linux-kernel On Sun, Dec 06, 2009 at 03:07:30PM +0100, Andi Kleen wrote: > > tools/perf has no support for separate object directories > and lots of hard coded paths assuming that the kernel source > is always in ../.. > > As a first step of compiling it separately without messing > up clean source trees allow to configure the kernel source > location using a KERNELSRC variable > > This allows at least to copy the whole tools/perf > directory elsewhere and build it separately. > > The default is still ../.., so for a standard build > nothing changes > > This also removes a lot of ugly ../.. from the source. > > Signed-off-by: Andi Kleen <ak@linux.intel.com> It does not apply cleanly, it seems you are using 2.6.32 There have a been a lot of updates in this merge window. Could you please resend against latest linus tree? Thanks. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-07 6:18 ` Frederic Weisbecker @ 2009-12-07 7:07 ` Ingo Molnar 2009-12-07 10:32 ` Andi Kleen 0 siblings, 1 reply; 8+ messages in thread From: Ingo Molnar @ 2009-12-07 7:07 UTC (permalink / raw) To: Frederic Weisbecker; +Cc: Andi Kleen, a.p.zijlstra, linux-kernel * Frederic Weisbecker <fweisbec@gmail.com> wrote: > On Sun, Dec 06, 2009 at 03:07:30PM +0100, Andi Kleen wrote: > > > > tools/perf has no support for separate object directories > > and lots of hard coded paths assuming that the kernel source > > is always in ../.. > > > > As a first step of compiling it separately without messing > > up clean source trees allow to configure the kernel source > > location using a KERNELSRC variable > > > > This allows at least to copy the whole tools/perf > > directory elsewhere and build it separately. > > > > The default is still ../.., so for a standard build > > nothing changes > > > > This also removes a lot of ugly ../.. from the source. > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > > > It does not apply cleanly, it seems you are using 2.6.32 There have a > been a lot of updates in this merge window. > > Could you please resend against latest linus tree? Even better would be a patch against latest -tip: http://people.redhat.com/mingo/tip.git/README which includes the latest perf event tree. Thanks, Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [1/2] perf: Make location of kernel source configurable 2009-12-07 7:07 ` Ingo Molnar @ 2009-12-07 10:32 ` Andi Kleen 0 siblings, 0 replies; 8+ messages in thread From: Andi Kleen @ 2009-12-07 10:32 UTC (permalink / raw) To: Ingo Molnar; +Cc: Frederic Weisbecker, Andi Kleen, a.p.zijlstra, linux-kernel > > > > It does not apply cleanly, it seems you are using 2.6.32 There have a > > been a lot of updates in this merge window. > > > > Could you please resend against latest linus tree? > > Even better would be a patch against latest -tip: > > http://people.redhat.com/mingo/tip.git/README > > which includes the latest perf event tree. Strangely it applies against git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip tip commit 38dc0971ca21f49b97cd139a278c210d4e50958d Author: Ingo Molnar <mingo@elte.hu> Date: Mon Dec 7 08:14:06 2009 +0100 auto-perf-next: add perf/lock without any offsets even: ~/lsrc/git/x86/linux-2.6-tip> patch -p1 --dry-run < ~/lsrc/linux-2.6.32-ak/patches/perf-kernelsrc patching file tools/perf/Makefile patching file tools/perf/perf.h patching file tools/perf/util/header.h patching file tools/perf/util/include/linux/list.h patching file tools/perf/util/include/linux/poison.h patching file tools/perf/util/include/linux/rbtree.h patching file tools/perf/util/util.h Looks like tip is the same as .32 in this regard or I tried the wrong tree. There's a reject against Linus' latest. I'm appending a patch that applies cleanly there. Also that tree seems to have gained a lot of new ../..s; I fixed those too, except those that do not go outside the perf directory tree. The other version number patch applies in both cases, just with some offsets. -Andi --- perf: Make location of kernel source configurable tools/perf has no support for separate object directories and lots of hard coded paths assuming that the kernel source is always in ../.. As a first step of compiling it separately without messing up clean source trees allow to configure the kernel source location using a KERNELSRC variable This allows at least to copy the whole tools/perf directory elsewhere and build it separately. The default is still ../.., so for a standard build nothing changes This also removes a lot of ugly ../.. from the source. Signed-off-by: Andi Kleen <ak@linux.intel.com> diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 23ec660..6cb1be8 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -151,6 +151,8 @@ all:: # # Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. +KERNELSRC := ../.. + PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE @$(SHELL_PATH) util/PERF-VERSION-GEN -include PERF-VERSION-FILE @@ -260,7 +262,7 @@ endif # 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 = -Iutil/include +BASIC_CFLAGS = -Iutil/include -I $(KERNELSRC) BASIC_LDFLAGS = # Guard against environment variables @@ -325,10 +327,10 @@ export PERL_PATH LIB_FILE=libperf.a -LIB_H += ../../include/linux/perf_event.h -LIB_H += ../../include/linux/rbtree.h -LIB_H += ../../include/linux/list.h -LIB_H += ../../include/linux/stringify.h +LIB_H += $(KERNELSRC)/include/linux/perf_event.h +LIB_H += $(KERNELSRC)/include/linux/rbtree.h +LIB_H += $(KERNELSRC)/include/linux/list.h +LIB_H += $(KERNELSRC)/include/linux/stringify.h LIB_H += util/include/linux/bitmap.h LIB_H += util/include/linux/bitops.h LIB_H += util/include/linux/compiler.h @@ -857,20 +859,20 @@ 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 +util/rbtree.o: $(KERNELSRC)/lib/rbtree.c PERF-CFLAGS $(QUIET_CC)$(CC) -o util/rbtree.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< # some perf warning policies can't fit to lib/bitmap.c, eg: it warns about variable shadowing # from <string.h> that comes from kernel headers wrapping. KBITMAP_FLAGS=`echo $(ALL_CFLAGS) | sed s/-Wshadow// | sed s/-Wswitch-default// | sed s/-Wextra//` -util/bitmap.o: ../../lib/bitmap.c PERF-CFLAGS +util/bitmap.o: $(KERNELSRC)/lib/bitmap.c PERF-CFLAGS $(QUIET_CC)$(CC) -o util/bitmap.o -c $(KBITMAP_FLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< -util/hweight.o: ../../lib/hweight.c PERF-CFLAGS +util/hweight.o: $(KERNELSRC)/lib/hweight.c PERF-CFLAGS $(QUIET_CC)$(CC) -o util/hweight.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< -util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS +util/find_next_bit.o: $(KERNELSRC)/lib/find_next_bit.c PERF-CFLAGS $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 454d5d5..c28938f 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -2,31 +2,31 @@ #define _PERF_PERF_H #if defined(__i386__) -#include "../../arch/x86/include/asm/unistd.h" +#include "arch/x86/include/asm/unistd.h" #define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory") #define cpu_relax() asm volatile("rep; nop" ::: "memory"); #endif #if defined(__x86_64__) -#include "../../arch/x86/include/asm/unistd.h" +#include "arch/x86/include/asm/unistd.h" #define rmb() asm volatile("lfence" ::: "memory") #define cpu_relax() asm volatile("rep; nop" ::: "memory"); #endif #ifdef __powerpc__ -#include "../../arch/powerpc/include/asm/unistd.h" +#include "arch/powerpc/include/asm/unistd.h" #define rmb() asm volatile ("sync" ::: "memory") #define cpu_relax() asm volatile ("" ::: "memory"); #endif #ifdef __s390__ -#include "../../arch/s390/include/asm/unistd.h" +#include "arch/s390/include/asm/unistd.h" #define rmb() asm volatile("bcr 15,0" ::: "memory") #define cpu_relax() asm volatile("" ::: "memory"); #endif #ifdef __sh__ -#include "../../arch/sh/include/asm/unistd.h" +#include "arch/sh/include/asm/unistd.h" #if defined(__SH4A__) || defined(__SH5__) # define rmb() asm volatile("synco" ::: "memory") #else @@ -36,25 +36,25 @@ #endif #ifdef __hppa__ -#include "../../arch/parisc/include/asm/unistd.h" +#include "arch/parisc/include/asm/unistd.h" #define rmb() asm volatile("" ::: "memory") #define cpu_relax() asm volatile("" ::: "memory"); #endif #ifdef __sparc__ -#include "../../arch/sparc/include/asm/unistd.h" +#include "arch/sparc/include/asm/unistd.h" #define rmb() asm volatile("":::"memory") #define cpu_relax() asm volatile("":::"memory") #endif #ifdef __alpha__ -#include "../../arch/alpha/include/asm/unistd.h" +#include "arch/alpha/include/asm/unistd.h" #define rmb() asm volatile("mb" ::: "memory") #define cpu_relax() asm volatile("" ::: "memory") #endif #ifdef __ia64__ -#include "../../arch/ia64/include/asm/unistd.h" +#include "arch/ia64/include/asm/unistd.h" #define rmb() asm volatile ("mf" ::: "memory") #define cpu_relax() asm volatile ("hint @pause" ::: "memory") #endif @@ -64,7 +64,7 @@ #include <sys/types.h> #include <sys/syscall.h> -#include "../../include/linux/perf_event.h" +#include "include/linux/perf_event.h" #include "util/types.h" /* diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index d1dbe2b..5fd474e 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h @@ -1,7 +1,7 @@ #ifndef __PERF_HEADER_H #define __PERF_HEADER_H -#include "../../../include/linux/perf_event.h" +#include "include/linux/perf_event.h" #include <sys/types.h> #include <stdbool.h> #include "types.h" diff --git a/tools/perf/util/include/asm/bitops.h b/tools/perf/util/include/asm/bitops.h index 58e9817..720f32f 100644 --- a/tools/perf/util/include/asm/bitops.h +++ b/tools/perf/util/include/asm/bitops.h @@ -8,11 +8,11 @@ /* CHECKME: Not sure both always match */ #define BITS_PER_LONG __WORDSIZE -#include "../../../../include/asm-generic/bitops/__fls.h" -#include "../../../../include/asm-generic/bitops/fls.h" -#include "../../../../include/asm-generic/bitops/fls64.h" -#include "../../../../include/asm-generic/bitops/__ffs.h" -#include "../../../../include/asm-generic/bitops/ffz.h" -#include "../../../../include/asm-generic/bitops/hweight.h" +#include "include/asm-generic/bitops/__fls.h" +#include "include/asm-generic/bitops/fls.h" +#include "include/asm-generic/bitops/fls64.h" +#include "include/asm-generic/bitops/__ffs.h" +#include "include/asm-generic/bitops/ffz.h" +#include "include/asm-generic/bitops/hweight.h" #endif diff --git a/tools/perf/util/include/asm/byteorder.h b/tools/perf/util/include/asm/byteorder.h index b722abe..e84174b 100644 --- a/tools/perf/util/include/asm/byteorder.h +++ b/tools/perf/util/include/asm/byteorder.h @@ -1,2 +1,2 @@ #include <asm/types.h> -#include "../../../../include/linux/swab.h" +#include "include/linux/swab.h" diff --git a/tools/perf/util/include/linux/bitmap.h b/tools/perf/util/include/linux/bitmap.h index 9450763..8bac145 100644 --- a/tools/perf/util/include/linux/bitmap.h +++ b/tools/perf/util/include/linux/bitmap.h @@ -1,3 +1,3 @@ -#include "../../../../include/linux/bitmap.h" -#include "../../../../include/asm-generic/bitops/find.h" +#include "include/linux/bitmap.h" +#include "include/asm-generic/bitops/find.h" #include <linux/errno.h> diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h index 8d63116..215bd63 100644 --- a/tools/perf/util/include/linux/bitops.h +++ b/tools/perf/util/include/linux/bitops.h @@ -5,7 +5,7 @@ #define CONFIG_GENERIC_FIND_NEXT_BIT #define CONFIG_GENERIC_FIND_FIRST_BIT -#include "../../../../include/linux/bitops.h" +#include "include/linux/bitops.h" #undef __KERNEL__ diff --git a/tools/perf/util/include/linux/list.h b/tools/perf/util/include/linux/list.h index dbe4b81..4644fc9 100644 --- a/tools/perf/util/include/linux/list.h +++ b/tools/perf/util/include/linux/list.h @@ -1,4 +1,4 @@ -#include "../../../../include/linux/list.h" +#include "include/linux/list.h" #ifndef PERF_LIST_H #define PERF_LIST_H diff --git a/tools/perf/util/include/linux/poison.h b/tools/perf/util/include/linux/poison.h index fef6dbc..5b8311d 100644 --- a/tools/perf/util/include/linux/poison.h +++ b/tools/perf/util/include/linux/poison.h @@ -1 +1 @@ -#include "../../../../include/linux/poison.h" +#include "include/linux/poison.h" diff --git a/tools/perf/util/include/linux/rbtree.h b/tools/perf/util/include/linux/rbtree.h index 7a243a1..712845f 100644 --- a/tools/perf/util/include/linux/rbtree.h +++ b/tools/perf/util/include/linux/rbtree.h @@ -1 +1 @@ -#include "../../../../include/linux/rbtree.h" +#include "include/linux/rbtree.h" diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 9e5dbd6..69f50ac 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1,4 +1,4 @@ -#include "../../../include/linux/hw_breakpoint.h" +#include "include/linux/hw_breakpoint.h" #include "util.h" #include "../perf.h" #include "parse-options.h" diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index c673d88..591f6d9 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -77,7 +77,7 @@ #include <netdb.h> #include <pwd.h> #include <inttypes.h> -#include "../../../include/linux/magic.h" +#include "include/linux/magic.h" #ifndef NO_ICONV @@ -137,7 +137,7 @@ extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); -#include "../../../include/linux/stringify.h" +#include "include/linux/stringify.h" #define DIE_IF(cnd) \ do { if (cnd) \ -- ak@linux.intel.com -- Speaking for myself only. ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-07 10:32 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-06 14:07 [PATCH] [1/2] perf: Make location of kernel source configurable Andi Kleen 2009-12-06 14:07 ` [PATCH] [2/2] perf: allow installing as perf-versionnumber Andi Kleen 2009-12-07 1:33 ` [PATCH] [1/2] perf: Make location of kernel source configurable Frederic Weisbecker 2009-12-07 5:25 ` Ingo Molnar 2009-12-07 5:31 ` Frederic Weisbecker 2009-12-07 6:18 ` Frederic Weisbecker 2009-12-07 7:07 ` Ingo Molnar 2009-12-07 10:32 ` Andi Kleen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox