He Kuang
1b29dfbba1
perf probe: Fix wrong register name for arm64
...
The register name of arm64 architecture is x0-x31 not r0-r31, this patch
changes this typo.
Before this patch:
# perf probe --definition 'sys_write count'
p:probe/sys_write _text+1502872 count=%r2:s64
# echo 'p:probe/sys_write _text+1502872 count=%r2:s64' > \
/sys/kernel/debug/tracing/kprobe_events
Parse error at argument[0]. (-22)
After this patch:
# perf probe --definition 'sys_write count'
p:probe/sys_write _text+1502872 count=%x2:s64
# echo 'p:probe/sys_write _text+1502872 count=%x2:s64' > \
/sys/kernel/debug/tracing/kprobe_events
# echo 1 >/sys/kernel/debug/tracing/events/probe/enable
# cat /sys/kernel/debug/tracing/trace
...
sh-422 [000] d... 650.495930: sys_write: (SyS_write+0x0/0xc8) count=22
sh-422 [000] d... 651.102389: sys_write: (SyS_write+0x0/0xc8) count=26
sh-422 [000] d... 651.358653: sys_write: (SyS_write+0x0/0xc8) count=86
Signed-off-by: He Kuang <[email protected] >
Acked-by: Masami Hiramatsu <[email protected] >
Acked-by: Will Deacon <[email protected] >
Cc: Alexander Shishkin <[email protected] >
Cc: Bintian Wang <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2017-01-26 11:42:43 -03:00
Masami Hiramatsu
293d5b4394
perf probe: Support probing on offline cross-arch binary
...
Support probing on offline cross-architecture binary by adding getting
the target machine arch from ELF and choose correct register string for
the machine.
Here is an example:
-----
$ perf probe --vmlinux=./vmlinux-arm --definition 'do_sys_open $params'
p:probe/do_sys_open do_sys_open+0 dfd=%r5:s32 filename=%r1:u32 flags=%r6:s32 mode=%r3:u16
-----
Here, we can get probe/do_sys_open from above and append it to to the target
machine's tracing/kprobe_events file in the tracefs mountput, usually
/sys/kernel/debug/tracing/kprobe_events (or /sys/kernel/tracing/kprobe_events).
Signed-off-by: Masami Hiramatsu <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/147214229717.23638.6440579792548044658.stgit@devbox
[ Add definition for EM_AARCH64 to fix the build on at least centos 6, debian 7 & ubuntu 12.04.5 ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-09-01 12:41:09 -03:00
Wang Nan
3237f28188
perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing
...
Newest libunwind does support ARM64, and perf is able to utilize it
also.
This patch enables the perf test dwarf unwind for arm64.
Test result:
# ./perf test unwind
25: Test dwarf unwind : Ok
Signed-off-by: Wang Nan <[email protected] >
Acked-by: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Zefan Li <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-05-29 12:43:40 -03:00
Mark Salter
7d885749b6
perf tools: Fix arm64 build error
...
I'm seeing the following build error on arm64:
In file included from util/event.c:3:0:
util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function)
u64 cache_regs[PERF_REGS_MAX];
^
This patch adds a PERF_REGS_MAX definition for arm64.
Signed-off-by: Mark Salter <[email protected] >
Acked-by: Jean Pihet <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jean Pihet <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-07-30 12:37:55 -03:00
Jean Pihet
21a8b756b8
perf tools: Consolidate types.h for ARM and ARM64
...
Prevents a build breakage since commit d944c4eebc
'tools: Consolidate types.h'
Signed-off-by: Jean Pihet <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-05-16 11:38:57 +02:00
Jean Pihet
8ab596afb9
perf tools ARM64: Wire up perf_regs and unwind support
...
This patch hooks in the perf_regs and libunwind code for ARM64.
The tools/perf/arch/arm64 is created; it contains the arch specific
code for DWARF unwinding.
Signed-off-by: Jean Pihet <[email protected] >
Acked-by: Will Deacon <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-04-29 15:31:19 +02:00