Message ID | 20180129083417.31240-4-ravi.bangoria@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | perf trace powerpc: Remove libaudit dependency for syscalls | expand |
Em Mon, Jan 29, 2018 at 02:04:17PM +0530, Ravi Bangoria escreveu: > +++ b/tools/perf/util/syscalltbl.c > @@ -30,6 +30,10 @@ > #include <asm/syscalls_64.c> > const int syscalltbl_native_max_id = SYSCALLTBL_S390_64_MAX_ID; > static const char **syscalltbl_native = syscalltbl_s390_64; > +#elif defined(__powerpc64__) > +#include <asm/syscalls_64.c> > +const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_64_MAX_ID; > +static const char **syscalltbl_native = syscalltbl_powerpc_64; > #endif This is so cool! Thanks! At some point we'll remove these #elif, have all of then linked, so that we can do cross-platform interpreting of perf.data files generated with 'perf trace record', i.e. 'perf trace -i perf.data.recorded.on.s390' on a powerpc64 or x86 machine. We're paving the way to that with patches like yours and those for s/390, thanks again! - Arnaldo
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 0dfdaa9..577a5d2 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -27,6 +27,8 @@ NO_SYSCALL_TABLE := 1 # Additional ARCH settings for ppc ifeq ($(SRCARCH),powerpc) NO_PERF_REGS := 0 + NO_SYSCALL_TABLE := 0 + CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated LIBUNWIND_LIBS := -lunwind -lunwind-ppc64 endif diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index 303bdb8..b12c5f5 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -30,6 +30,10 @@ #include <asm/syscalls_64.c> const int syscalltbl_native_max_id = SYSCALLTBL_S390_64_MAX_ID; static const char **syscalltbl_native = syscalltbl_s390_64; +#elif defined(__powerpc64__) +#include <asm/syscalls_64.c> +const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_64_MAX_ID; +static const char **syscalltbl_native = syscalltbl_powerpc_64; #endif struct syscall {
This should speed up accessing new system calls introduced with the kernel rather than waiting for libaudit updates to include them. It also enables users to specify wildcards, for example, perf trace -e 'open*', just like was already possible on x86 and s390. Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> --- tools/perf/Makefile.config | 2 ++ tools/perf/util/syscalltbl.c | 4 ++++ 2 files changed, 6 insertions(+)