Re: [PATCH 0/2] perf probe: Support debuginfod client
Em Wed, Sep 16, 2020 at 04:17:53PM -0400, Frank Ch. Eigler escreveu: > Hi - > > > > Nice, even uses the source code fetching part of the webapi! > > > > So, can I take that as an Acked-by or Reviewed-by? > > Sure. Thanks, applied both now that the things that made some 'perf probe' 'perf test' entries to fail is out of the way, all passes now with these patches. - Arnaldo
Re: [PATCH 0/2] perf probe: Support debuginfod client
Hi - > > > I need to support this in pahole... > > > > pahole/dwarves use elfutils, so it already has automatic support. > > https://sourceware.org/elfutils/Debuginfod.html > > I'm still not sure that which interface of elfutils I should use > for this "automatic" debuginfod support. Are there good documentation > about it? The libdwfl part of the elfutils API falls back to debuginfod lookups internally, so e.g. systemtap had to do nothing to benefit. > Since this series just for the kernel binary, I have to check we > can do something on user-space binaries. It should work identically & transparently. If you're using one of a few key packages of a few mainstream distros, the public debuginfod server may already have the material available. - FChE
Re: [PATCH 0/2] perf probe: Support debuginfod client
On Wed, 16 Sep 2020 16:17:53 -0400 "Frank Ch. Eigler" wrote: > Hi - > > > > Nice, even uses the source code fetching part of the webapi! > > > > So, can I take that as an Acked-by or Reviewed-by? > > Sure. Thanks Frank and Arnaldo! > > > I need to support this in pahole... > > pahole/dwarves use elfutils, so it already has automatic support. > > https://sourceware.org/elfutils/Debuginfod.html I'm still not sure that which interface of elfutils I should use for this "automatic" debuginfod support. Are there good documentation about it? Since this series just for the kernel binary, I have to check we can do something on user-space binaries. Thank you, -- Masami Hiramatsu
[PATCH 0/2] perf probe: Support debuginfod client
Hi, Here is a couple of patches to enable debuginfod support on perf probe command. This allows users to access debuginfo binary from remote device. Since the perf-probe heavily depends on the debuginfo, debuginfod gives us many benefits on the perf probe command on remote machine, especially for the embedded devices. Here is an example (copied from [2/2]) 1. at first you need to start debuginfod on the host machine. -F option scans local debuginfo binary. (You don't need to pass the source tree, but you must keep the source tree untouched) (host) $ cd PATH/TO/KBUILD/DIR/ (host) $ debuginfod -F . ... 2. In the remote machine, you need to set DEBUGINFOD_URLS. debuginfod uses 8002 tcp port. (remote) # export DEBUGINFOD_URLS="http://$HOST_IP:8002/; 3. Then you can use the perf probe (it can refer the source code) (remote) # perf probe -L vfs_read 0 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) { 2 ssize_t ret; if (!(file->f_mode & FMODE_READ)) return -EBADF; 6 if (!(file->f_mode & FMODE_CAN_READ)) return -EINVAL; 8 if (unlikely(!access_ok(buf, count))) return -EFAULT; 11 ret = rw_verify_area(READ, file, pos, count); 12 if (ret) return ret; if (count > MAX_RW_COUNT) ... (remote) # perf probe -a "vfs_read count" Added new event: probe:vfs_read (on vfs_read with count) (remote) # perf probe -l probe:vfs_read (on vfs_read@ksrc/linux/fs/read_write.c with count) Thank you, --- Masami Hiramatsu (2): perf probe: Fix to adjust symbol address with correct reloc_sym address perf probe: Fall back to debuginfod query if debuginfo and source not found tools/perf/util/probe-event.c | 60 +--- tools/perf/util/probe-finder.c | 56 ++--- tools/perf/util/probe-finder.h |7 +++-- 3 files changed, 112 insertions(+), 11 deletions(-) -- Masami Hiramatsu (Linaro)
Re: [PATCH 0/2] perf probe: Support debuginfod client
Hi - > > Nice, even uses the source code fetching part of the webapi! > > So, can I take that as an Acked-by or Reviewed-by? Sure. > I need to support this in pahole... pahole/dwarves use elfutils, so it already has automatic support. https://sourceware.org/elfutils/Debuginfod.html - FChE
Re: [PATCH 0/2] perf probe: Support debuginfod client
Em Wed, Sep 16, 2020 at 02:13:07PM -0400, Frank Ch. Eigler escreveu: > Hi - > > Nice, even uses the source code fetching part of the webapi! So, can I take that as an Acked-by or Reviewed-by? :-) - Arnaldo I need to support this in pahole... > - FChE > -- - Arnaldo
Re: [PATCH 0/2] perf probe: Support debuginfod client
Hi - Nice, even uses the source code fetching part of the webapi! - FChE