Skip to content

Commit

Permalink
perf tools: Move syscall number fallbacks from perf-sys.h to tools/ar…
Browse files Browse the repository at this point in the history
…ch/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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 12, 2016
1 parent 9c304f6 commit cec07f5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
9 changes: 9 additions & 0 deletions tools/arch/x86/include/asm/unistd_32.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __NR_perf_event_open
# define __NR_perf_event_open 336
#endif
#ifndef __NR_futex
# define __NR_futex 240
#endif
#ifndef __NR_gettid
# define __NR_gettid 224
#endif
9 changes: 9 additions & 0 deletions tools/arch/x86/include/asm/unistd_64.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __NR_perf_event_open
# define __NR_perf_event_open 298
#endif
#ifndef __NR_futex
# define __NR_futex 202
#endif
#ifndef __NR_gettid
# define __NR_gettid 186
#endif
1 change: 1 addition & 0 deletions tools/perf/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ CFLAGS += -I$(src-perf)/arch/$(ARCH)/include
CFLAGS += -I$(srctree)/tools/include/
CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
CFLAGS += -I$(srctree)/arch/$(ARCH)/include
CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include
CFLAGS += -I$(srctree)/include/uapi
CFLAGS += -I$(srctree)/include

Expand Down
18 changes: 0 additions & 18 deletions tools/perf/perf-sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,11 @@
#if defined(__i386__)
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
#ifndef __NR_perf_event_open
# define __NR_perf_event_open 336
#endif
#ifndef __NR_futex
# define __NR_futex 240
#endif
#ifndef __NR_gettid
# define __NR_gettid 224
#endif
#endif

#if defined(__x86_64__)
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
#ifndef __NR_perf_event_open
# define __NR_perf_event_open 298
#endif
#ifndef __NR_futex
# define __NR_futex 202
#endif
#ifndef __NR_gettid
# define __NR_gettid 186
#endif
#endif

#ifdef __powerpc__
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/include/asm/unistd_32.h

This file was deleted.

1 change: 0 additions & 1 deletion tools/perf/util/include/asm/unistd_64.h

This file was deleted.

0 comments on commit cec07f5

Please sign in to comment.