aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-07-07 17:28:43 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 14:19:54 -0400
commitcec07f53c398f22576df77052c4777dc13f14962 (patch)
tree38b2c6d3718a0a33629249db930147495db84709 /tools
parent9c304f6c715f1849bb5b0d450a600dc731a80bda (diff)
perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/
And remove the empty tools/arch/x86/include/asm/unistd_{32,64}.h files introduced by eae7a755ee81 ("perf tools, x86: Build perf on older user-space as well"). This way we get closer to mirroring the kernel for cases where __NR_ can't be found for some include path/_GNU_SOURCE/whatever scenario. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-kpj6m3mbjw82kg6krk2z529e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/arch/x86/include/asm/unistd_32.h9
-rw-r--r--tools/arch/x86/include/asm/unistd_64.h9
-rw-r--r--tools/perf/config/Makefile1
-rw-r--r--tools/perf/perf-sys.h18
-rw-r--r--tools/perf/util/include/asm/unistd_32.h1
-rw-r--r--tools/perf/util/include/asm/unistd_64.h1
6 files changed, 19 insertions, 20 deletions
diff --git a/tools/arch/x86/include/asm/unistd_32.h b/tools/arch/x86/include/asm/unistd_32.h
new file mode 100644
index 000000000000..cf33ab09273d
--- /dev/null
+++ b/tools/arch/x86/include/asm/unistd_32.h
@@ -0,0 +1,9 @@
1#ifndef __NR_perf_event_open
2# define __NR_perf_event_open 336
3#endif
4#ifndef __NR_futex
5# define __NR_futex 240
6#endif
7#ifndef __NR_gettid
8# define __NR_gettid 224
9#endif
diff --git a/tools/arch/x86/include/asm/unistd_64.h b/tools/arch/x86/include/asm/unistd_64.h
new file mode 100644
index 000000000000..2c9835695b56
--- /dev/null
+++ b/tools/arch/x86/include/asm/unistd_64.h
@@ -0,0 +1,9 @@
1#ifndef __NR_perf_event_open
2# define __NR_perf_event_open 298
3#endif
4#ifndef __NR_futex
5# define __NR_futex 202
6#endif
7#ifndef __NR_gettid
8# define __NR_gettid 186
9#endif
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index c7e269a7ca37..7d2ea691c11b 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -209,6 +209,7 @@ CFLAGS += -I$(src-perf)/arch/$(ARCH)/include
209CFLAGS += -I$(srctree)/tools/include/ 209CFLAGS += -I$(srctree)/tools/include/
210CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi 210CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
211CFLAGS += -I$(srctree)/arch/$(ARCH)/include 211CFLAGS += -I$(srctree)/arch/$(ARCH)/include
212CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include
212CFLAGS += -I$(srctree)/include/uapi 213CFLAGS += -I$(srctree)/include/uapi
213CFLAGS += -I$(srctree)/include 214CFLAGS += -I$(srctree)/include
214 215
diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index 83a25cef82fd..5cee8a3d0455 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -11,29 +11,11 @@
11#if defined(__i386__) 11#if defined(__i386__)
12#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 12#define cpu_relax() asm volatile("rep; nop" ::: "memory");
13#define CPUINFO_PROC {"model name"} 13#define CPUINFO_PROC {"model name"}
14#ifndef __NR_perf_event_open
15# define __NR_perf_event_open 336
16#endif
17#ifndef __NR_futex
18# define __NR_futex 240
19#endif
20#ifndef __NR_gettid
21# define __NR_gettid 224
22#endif
23#endif 14#endif
24 15
25#if defined(__x86_64__) 16#if defined(__x86_64__)
26#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 17#define cpu_relax() asm volatile("rep; nop" ::: "memory");
27#define CPUINFO_PROC {"model name"} 18#define CPUINFO_PROC {"model name"}
28#ifndef __NR_perf_event_open
29# define __NR_perf_event_open 298
30#endif
31#ifndef __NR_futex
32# define __NR_futex 202
33#endif
34#ifndef __NR_gettid
35# define __NR_gettid 186
36#endif
37#endif 19#endif
38 20
39#ifdef __powerpc__ 21#ifdef __powerpc__
diff --git a/tools/perf/util/include/asm/unistd_32.h b/tools/perf/util/include/asm/unistd_32.h
deleted file mode 100644
index 8b137891791f..000000000000
--- a/tools/perf/util/include/asm/unistd_32.h
+++ /dev/null
@@ -1 +0,0 @@
1
diff --git a/tools/perf/util/include/asm/unistd_64.h b/tools/perf/util/include/asm/unistd_64.h
deleted file mode 100644
index 8b137891791f..000000000000
--- a/tools/perf/util/include/asm/unistd_64.h
+++ /dev/null
@@ -1 +0,0 @@
1