Messages in this thread | | | Subject | [RFC PATCH perf/core 00/13] perf-probe --cache support | From | Masami Hiramatsu <> | Date | Mon, 01 Jun 2015 00:11:21 +0900 |
| |
Hi,
Here is a patches for probe-cache which is going to be perf-cache finally, but I'd like to implement prototype on perf-probe. So, this version is still not ready to be merged.
The perf-probe is useful for debugging, but it strongly depends on the debuginfo. Without debuginfo, it is just a frontend of ftrace's dynamic events. This can usually happen in server farms or on cloud system, since no one wants to distribute big debuginfo packages.
To solve this issue, I had tried to make a pre-analyzed probes ( https://lkml.org/lkml/2014/10/31/207 ) but it has a problm that we can't ensure the probed binary is same as what we analyzed. Arnaldo gave me an idea to reuse build-id cache for that perpose and this series is the first prototype of that.
At the same time, Hemant has started to support SDT probes which also use the cache file of SDT info. So I decided to merge this into the same build-id cache. In this version, I couldn't get it done... it still needs a bit more patches. I'll do that in the next version.
In this version, perf probe supports --cache option which means that perf probe manipulate probe caches, for example,
perf probe --cache --add "probe-desc"
does not only add probe events but also add "probe-desc" and it's result on the cache. (Note that the cached entry is always referred even without --cache) The --list and --del commands also support --cache. Note that both are only manipulate caches, not real events.
Thank you,
---
Masami Hiramatsu (13): perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid perf probe: Simplify __add_probe_trace_events code perf probe: Move ftrace probe-event operations to probe-file.c perf buildid: Use SBUILD_ID_SIZE macro perf buildid: Introduce sysfs/filename__sprintf_build_id perf: Add lsdir to read a directory perf-buildid-cache: Use lsdir for looking up buildid caches perf probe: Check kprobe blacklist in converting phase perf probe: Use strbuf for making strings in probe-event.c perf probe: Add --cache option to cache the probe definitions perf probe: Use cache entry if possible perf probe: Show all cached probes perf probe: Remove caches when --cache is given
tools/perf/builtin-buildid-cache.c | 22 - tools/perf/builtin-buildid-list.c | 28 - tools/perf/builtin-probe.c | 3 tools/perf/util/Build | 1 tools/perf/util/build-id.c | 203 ++++++-- tools/perf/util/build-id.h | 11 tools/perf/util/dso.h | 5 tools/perf/util/probe-event.c | 927 +++++++++++++++--------------------- tools/perf/util/probe-event.h | 15 + tools/perf/util/probe-file.c | 694 +++++++++++++++++++++++++++ tools/perf/util/probe-file.h | 44 ++ tools/perf/util/probe-finder.c | 10 tools/perf/util/symbol.c | 2 tools/perf/util/util.c | 34 + tools/perf/util/util.h | 4 15 files changed, 1386 insertions(+), 617 deletions(-) create mode 100644 tools/perf/util/probe-file.c create mode 100644 tools/perf/util/probe-file.h
-- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com
| |