Skip to content

Commit cec07f5

Browse files
committed
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 eae7a75 ("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>
1 parent 9c304f6 commit cec07f5

6 files changed

Lines changed: 19 additions & 20 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

‎tools/perf/config/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ CFLAGS += -I$(src-perf)/arch/$(ARCH)/include
209209
CFLAGS += -I$(srctree)/tools/include/
210210
CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
211211
CFLAGS += -I$(srctree)/arch/$(ARCH)/include
212+
CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include
212213
CFLAGS += -I$(srctree)/include/uapi
213214
CFLAGS += -I$(srctree)/include
214215

‎tools/perf/perf-sys.h‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,11 @@
1111
#if defined(__i386__)
1212
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
1313
#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
2314
#endif
2415

2516
#if defined(__x86_64__)
2617
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
2718
#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
3719
#endif
3820

3921
#ifdef __powerpc__

‎tools/perf/util/include/asm/unistd_32.h‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎tools/perf/util/include/asm/unistd_64.h‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)