mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Paul Mackerras <paulus@samba.org>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>, Borislav Petkov <bp@suse.de>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>
Subject: [RFC PATCH perf/core  00/13] perf-probe --cache support
Date: Mon, 01 Jun 2015 00:11:21 +0900	[thread overview]
Message-ID: <20150531151120.15103.22153.stgit@localhost.localdomain> (raw)

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

             reply	other threads:[~2015-05-31 15:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31 15:11 Masami Hiramatsu [this message]
2015-05-31 15:11 ` [RFC PATCH perf/core 01/13] perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 02/13] perf probe: Simplify __add_probe_trace_events code Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 03/13] perf probe: Move ftrace probe-event operations to probe-file.c Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 04/13] perf buildid: Use SBUILD_ID_SIZE macro Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 05/13] perf buildid: Introduce sysfs/filename__sprintf_build_id Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 06/13] perf: Add lsdir to read a directory Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 07/13] perf-buildid-cache: Use lsdir for looking up buildid caches Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 08/13] perf probe: Check kprobe blacklist in converting phase Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 09/13] perf probe: Use strbuf for making strings in probe-event.c Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 10/13] perf probe: Add --cache option to cache the probe definitions Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 11/13] perf probe: Use cache entry if possible Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 12/13] perf probe: Show all cached probes Masami Hiramatsu
2015-05-31 15:11 ` [RFC PATCH perf/core 13/13] perf probe: Remove caches when --cache is given 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=20150531151120.15103.22153.stgit@localhost.localdomain \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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

all inboxes | Powered by JetHome®