From: Masami Hiramatsu <mhiramat@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH v2 0/3] perf probe: Introduce remote cross-arch probes
Date: Fri, 26 Aug 2016 01:24:10 +0900 [thread overview]
Message-ID: <147214224523.23638.10155676067678947950.stgit@devbox> (raw)
Hi,
Here is the 2nd version of remote cross-arch probe support on perf-probe.
V1 is here:
https://lkml.org/lkml/2016/8/24/29
Currently perf-probe doesn't supoort cross/remote target. This means
we have to cross-build the perf-tools including libraries (elfutils,
libelf etc.), and to prepare vmlinux with debuginfo which can be
accessed from the target machine.
This requires too much resource for a small embededd device.
If we can analyze the debuginfo by perf-probe on host machine,
we do not need to cross-build perf-tools, nor copy vmlinux on the
device. :)
For that purpose, this series adds --definition(-D) command for
perf-probe, which shows trace event definition instead of adding
it in running kernel, according to Arnaldo's comment.
Using -D with --vmlinux(or -k)=OFFLINE-VMLINUX, perf-probe reads
the vmlinux architecture and show definition with correct
dwarf-registers.
perf probe -k <cross-vmlinux> -D <probe-point> <arguments>
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 event by "copy & paste" the
definition to target-machine's debugfs/tracing/kprobe_events.
Note that it shows definition with direct symbol name instead of
_text+offset. It is treated as an offline module.
Thanks,
---
Masami Hiramatsu (3):
perf-probe: Show trace event definition
perf-probe: Ignore vmlinux buildid if offline kernel is given
perf-probe: Support probing on offline cross-arch binary
tools/perf/Documentation/perf-probe.txt | 9 +++
tools/perf/arch/arm/include/dwarf-regs-table.h | 9 +++
tools/perf/arch/arm64/include/dwarf-regs-table.h | 13 +++++
tools/perf/arch/powerpc/include/dwarf-regs-table.h | 27 ++++++++++
tools/perf/arch/s390/include/dwarf-regs-table.h | 8 +++
tools/perf/arch/sh/include/dwarf-regs-table.h | 25 +++++++++
tools/perf/arch/sparc/include/dwarf-regs-table.h | 18 +++++++
tools/perf/arch/x86/include/dwarf-regs-table.h | 14 +++++
tools/perf/arch/xtensa/include/dwarf-regs-table.h | 8 +++
tools/perf/builtin-probe.c | 34 ++++++++++--
tools/perf/util/Build | 1
tools/perf/util/dwarf-regs.c | 55 ++++++++++++++++++++
tools/perf/util/include/dwarf-regs.h | 6 ++
tools/perf/util/probe-event.c | 50 ++++++++++++++++++
tools/perf/util/probe-event.h | 1
tools/perf/util/probe-finder.c | 27 ++++++----
tools/perf/util/probe-finder.h | 1
tools/perf/util/symbol-elf.c | 2 -
18 files changed, 289 insertions(+), 19 deletions(-)
create mode 100644 tools/perf/arch/arm/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/arm64/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/powerpc/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/s390/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/sh/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/sparc/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/x86/include/dwarf-regs-table.h
create mode 100644 tools/perf/arch/xtensa/include/dwarf-regs-table.h
create mode 100644 tools/perf/util/dwarf-regs.c
--
Masami Hiramatsu (Linaro Ltd.) <mhiramat@kernel.org>
next reply other threads:[~2016-08-25 16:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 16:24 Masami Hiramatsu [this message]
2016-08-25 16:24 ` [PATCH v2 1/3] perf-probe: Show trace event definition Masami Hiramatsu
2016-09-05 13:22 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-25 16:24 ` [PATCH v2 2/3] perf-probe: Ignore vmlinux buildid if offline kernel is given Masami Hiramatsu
2016-08-26 14:02 ` Masami Hiramatsu
2016-09-05 13:22 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-25 16:24 ` [PATCH v2 3/3] perf-probe: Support probing on offline cross-arch binary Masami Hiramatsu
2016-08-31 20:54 ` Arnaldo Carvalho de Melo
2016-08-31 23:25 ` Masami Hiramatsu
2016-09-09 14:37 ` [BUG] " Arnaldo Carvalho de Melo
2016-09-09 14:59 ` [BUGFIX] " Arnaldo Carvalho de Melo
2016-09-09 15:28 ` Masami Hiramatsu
2016-09-09 15:43 ` Arnaldo Carvalho de Melo
2016-09-05 13:23 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-26 14:57 ` [PATCH v2 4/4] perf-probe: Ignore vmlinux Build-id when offline vmlinux given Masami Hiramatsu
2016-09-05 13:23 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-31 1:01 ` [PATCH v2 0/3] perf probe: Introduce remote cross-arch probes Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147214224523.23638.10155676067678947950.stgit@devbox \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox