perf syscalltbl: Remove syscall_table.hThe definition of "static const char *const syscalltbl[] = {" is donein a generated syscalls_32.h or syscalls_64.h that is architecturedependent. In order t
perf syscalltbl: Remove syscall_table.hThe definition of "static const char *const syscalltbl[] = {" is donein a generated syscalls_32.h or syscalls_64.h that is architecturedependent. In order to include the appropriate file a syscall_table.his found via the perf include path and it includes the syscalls_32.hor syscalls_64.h as appropriate.To support having multiple syscall tables, one for 32-bit and one for64-bit, or for different architectures, an include path cannot beused. Remove syscall_table.h because of this and inline what it doesinto syscalltbl.c.For architectures without a syscall_table.h this will cause a failureto include either syscalls_32.h or syscalls_64.h rather than a failureto include syscall_table.h. For architectures that only included oneor other, the behavior matches BITS_PER_LONG as previously done onarchitectures supporting both syscalls_32.h and syscalls_64.h.Signed-off-by: Ian Rogers <[email protected]>Reviewed-by: Howard Chu <[email protected]>Reviewed-by: Charlie Jenkins <[email protected]>Reviewed-by: Namhyung Kim <[email protected]>Acked-by: Arnaldo Carvalho de Melo <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Namhyung Kim <[email protected]>
show more ...
perf tools csky: Support generic syscall headerscsky uses the generic syscall table, use that in perf instead ofrequiring libaudit.Signed-off-by: Charlie Jenkins <[email protected]>Acked-by:
perf tools csky: Support generic syscall headerscsky uses the generic syscall table, use that in perf instead ofrequiring libaudit.Signed-off-by: Charlie Jenkins <[email protected]>Acked-by: Guo Ren <[email protected]>Cc: Adrian Hunter <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: Arnd Bergmann <[email protected]>Cc: Christian Brauner <[email protected]>Cc: Günther Noack <[email protected]>Cc: Ian Rogers <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: James Clark <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: John Garry <[email protected]>Cc: Jonathan Corbet <[email protected]>Cc: Leo Yan <[email protected]>Cc: Mark Rutland <[email protected]>Cc: Mickaël Salaün <[email protected]>Cc: Mike Leach <[email protected]>Cc: Namhyung Kim <[email protected]>Cc: Palmer Dabbelt <[email protected]>Cc: Paul Walmsley <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Will Deacon <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
perf parse-regs: Remove unused macros PERF_REG_{IP|SP}The macros PERF_REG_{IP|SP} have been replaced by using functionsperf_arch_reg_{ip|sp}(), remove them!Signed-off-by: Leo Yan <leo.yan@linaro
perf parse-regs: Remove unused macros PERF_REG_{IP|SP}The macros PERF_REG_{IP|SP} have been replaced by using functionsperf_arch_reg_{ip|sp}(), remove them!Signed-off-by: Leo Yan <[email protected]>Acked-by: Ian Rogers <[email protected]>Cc: Adrian Hunter <[email protected]>Cc: Albert Ou <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: Eric Lin <[email protected]>Cc: Fangrui Song <[email protected]>Cc: Guo Ren <[email protected]>Cc: Huacai Chen <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: Ivan Babrou <[email protected]>Cc: James Clark <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: John Garry <[email protected]>Cc: Kan Liang <[email protected]>Cc: Mark Rutland <[email protected]>Cc: Mike Leach <[email protected]>Cc: Ming Wang <[email protected]>Cc: Namhyung Kim <[email protected]>Cc: Palmer Dabbelt <[email protected]>Cc: Paul Walmsley <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Sandipan Das <[email protected]>Cc: Will Deacon <[email protected]>Cc: [email protected]Cc: [email protected]Cc: [email protected]Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
perf arch: Support register names from all archsWhen reading a perf.data file with register values, there is a mismatchbetween the names and the values of the registers because the tool isbuilt u
perf arch: Support register names from all archsWhen reading a perf.data file with register values, there is a mismatchbetween the names and the values of the registers because the tool isbuilt using only the register names from the local architecture.Reading a perf.data file that was recorded on ARM64, gives the followingerroneous output on an X86 machine: # perf report -i perf_arm64.data -D [...] 24661932634451 0x698 [0x21d0]: PERF_RECORD_SAMPLE(IP, 0x1): 43239/43239: 0xffffc5be8f100f98 period: 1 addr: 0 ... user regs: mask 0x1ffffffff ABI 64-bit .... AX 0x0000ffffd1515817 .... BX 0x0000ffffd1515480 .... CX 0x0000aaaadabf6c80 .... DX 0x000000000000002e .... SI 0x0000000040100401 .... DI 0x0040600200000080 .... BP 0x0000ffffd1510e10 .... SP 0x0000000000000000 .... IP 0x00000000000000dd .... FLAGS 0x0000ffffd1510cd0 .... CS 0x0000000000000000 .... SS 0x0000000000000030 .... DS 0x0000ffffa569a208 .... ES 0x0000000000000000 .... FS 0x0000000000000000 .... GS 0x0000000000000000 .... R8 0x0000aaaad3de9650 .... R9 0x0000ffffa57397f0 .... R10 0x0000000000000001 .... R11 0x0000ffffa57fd000 .... R12 0x0000ffffd1515817 .... R13 0x0000ffffd1515480 .... R14 0x0000aaaadabf6c80 .... R15 0x0000000000000000 .... unknown 0x0000000000000001 .... unknown 0x0000000000000000 .... unknown 0x0000000000000000 .... unknown 0x0000000000000000 .... unknown 0x0000000000000000 .... unknown 0x0000ffffd1510d90 .... unknown 0x0000ffffa5739b90 .... unknown 0x0000ffffd1510d80 .... XMM0 0x0000ffffa57392c8 ... thread: perf-exec:43239 ...... dso: [kernel.kallsyms]As can be seen, the register names correspond to X86 registers, eventhough the perf.data file was recorded on an ARM64 system. After thispatch, the output of the command displays the correct register names: # perf report -i perf_arm64.data -D [...] 24661932634451 0x698 [0x21d0]: PERF_RECORD_SAMPLE(IP, 0x1): 43239/43239: 0xffffc5be8f100f98 period: 1 addr: 0 ... user regs: mask 0x1ffffffff ABI 64-bit .... x0 0x0000ffffd1515817 .... x1 0x0000ffffd1515480 .... x2 0x0000aaaadabf6c80 .... x3 0x000000000000002e .... x4 0x0000000040100401 .... x5 0x0040600200000080 .... x6 0x0000ffffd1510e10 .... x7 0x0000000000000000 .... x8 0x00000000000000dd .... x9 0x0000ffffd1510cd0 .... x10 0x0000000000000000 .... x11 0x0000000000000030 .... x12 0x0000ffffa569a208 .... x13 0x0000000000000000 .... x14 0x0000000000000000 .... x15 0x0000000000000000 .... x16 0x0000aaaad3de9650 .... x17 0x0000ffffa57397f0 .... x18 0x0000000000000001 .... x19 0x0000ffffa57fd000 .... x20 0x0000ffffd1515817 .... x21 0x0000ffffd1515480 .... x22 0x0000aaaadabf6c80 .... x23 0x0000000000000000 .... x24 0x0000000000000001 .... x25 0x0000000000000000 .... x26 0x0000000000000000 .... x27 0x0000000000000000 .... x28 0x0000000000000000 .... x29 0x0000ffffd1510d90 .... lr 0x0000ffffa5739b90 .... sp 0x0000ffffd1510d80 .... pc 0x0000ffffa57392c8 ... thread: perf-exec:43239 ...... dso: [kernel.kallsyms]Tester comments:Athira reports:"Looks good to me. Tested this patchset in powerpc by capturing regs inpowerpc and doing perf report to read the data from x86."Reported-by: Alexandre Truong <[email protected]>Reviewed-by: Athira Jajeev <[email protected]>Signed-off-by: German Gomez <[email protected]>Tested-by: Athira Jajeev <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: John Garry <[email protected]>Cc: Leo Yan <[email protected]>Cc: Mark Rutland <[email protected]>Cc: Mathieu Poirier <[email protected]>Cc: Namhyung Kim <[email protected]>Cc: Will Deacon <[email protected]>Cc: [email protected]Cc: [email protected]Cc: [email protected]Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
perf tools: Fix arm64 build error with gcc-11gcc version: 11.0.0 20210208 (experimental) (GCC)Following build error on arm64:.......In function ‘printf’, inlined from ‘regs_dump__printf’ a
perf tools: Fix arm64 build error with gcc-11gcc version: 11.0.0 20210208 (experimental) (GCC)Following build error on arm64:.......In function ‘printf’, inlined from ‘regs_dump__printf’ at util/session.c:1141:3, inlined from ‘regs__printf’ at util/session.c:1169:2:/usr/include/aarch64-linux-gnu/bits/stdio2.h:107:10: \ error: ‘%-5s’ directive argument is null [-Werror=format-overflow=]107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, \ __va_arg_pack ());......In function ‘fprintf’, inlined from ‘perf_sample__fprintf_regs.isra’ at \ builtin-script.c:622:14:/usr/include/aarch64-linux-gnu/bits/stdio2.h:100:10: \ error: ‘%5s’ directive argument is null [-Werror=format-overflow=] 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, 101 | __va_arg_pack ());cc1: all warnings being treated as errors.......This patch fixes Wformat-overflow warnings. Add helper function toconvert NULL to "unknown".Signed-off-by: Jianlin Lv <[email protected]>Reviewed-by: John Garry <[email protected]>Acked-by: Jiri Olsa <[email protected]>Cc: Albert Ou <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: Anju T Sudhakar <[email protected]>Cc: Athira Jajeev <[email protected]>Cc: Guo Ren <[email protected]>Cc: Kajol Jain <[email protected]>Cc: Leo Yan <[email protected]>Cc: Mark Rutland <[email protected]>Cc: Mathieu Poirier <[email protected]>Cc: Namhyung Kim <[email protected]>Cc: Paul Walmsley <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Ravi Bangoria <[email protected]>Cc: Will Deacon <[email protected]>Cc: Palmer Dabbelt <[email protected]>Cc: [email protected]Cc: [email protected]Cc: [email protected]Link: http://lore.kernel.org/lkml/[email protected]Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
csky: Add support for perf unwind-libdwThis patch add support for DWARF register mappings and libdw registersinitialization, which is used by perf callchain analyzing, eg:perf record --call-grap
csky: Add support for perf unwind-libdwThis patch add support for DWARF register mappings and libdw registersinitialization, which is used by perf callchain analyzing, eg:perf record --call-graph=dwarf <COMMAND>Here is elfutils csky backend patch set:https://sourceware.org/ml/elfutils-devel/2019-q2/msg00007.htmlSigned-off-by: Mao Han <[email protected]>Signed-off-by: Guo Ren <[email protected]>Cc: Peter Zijlstra <[email protected]>Cc: Ingo Molnar <[email protected]>Cc: Arnaldo Carvalho de Melo <[email protected]>Cc: Alexander Shishkin <[email protected]>Cc: Jiri Olsa <[email protected]>Cc: Namhyung Kim <[email protected]>Cc: Arnd Bergmann <[email protected]>