aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-file.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-06-15 12:28:30 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-06-15 14:34:31 -0300
commitdd975497adcdd2526ae332d3938bd5d6e1c3731a (patch)
tree5d77c4d3f774c3a9c3caae1db06dffabbe9e7ed9 /tools/perf/util/probe-file.h
parentperf hists: Replace perf_evsel arg perf_hpp_fmt's width callback (diff)
downloadlinux-dev-dd975497adcdd2526ae332d3938bd5d6e1c3731a.tar.xz
linux-dev-dd975497adcdd2526ae332d3938bd5d6e1c3731a.zip
perf probe: Introduce perf_cache interfaces
Introduce perf_cache object and interfaces to create, add entries, commit, and delete the object. perf_cache represents a file for the cached "perf probe" definitions on one binary file or vmlinux which has its own build id. The probe cache file is located under the build-id cache directory of the target binary, as below; <perf-debug-dir>/.build-id/<BU>/<ILDID>/probe Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160615032830.31330.84998.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-file.h')
-rw-r--r--tools/perf/util/probe-file.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index 18ac9cf51c34..d872e3df7e59 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -5,6 +5,19 @@
#include "strfilter.h"
#include "probe-event.h"
+/* Cache of probe definitions */
+struct probe_cache_entry {
+ struct list_head node;
+ struct perf_probe_event pev;
+ char *spev;
+ struct strlist *tevlist;
+};
+
+struct probe_cache {
+ int fd;
+ struct list_head entries;
+};
+
#define PF_FL_UPROBE 1
#define PF_FL_RW 2
@@ -18,5 +31,12 @@ int probe_file__get_events(int fd, struct strfilter *filter,
struct strlist *plist);
int probe_file__del_strlist(int fd, struct strlist *namelist);
+struct probe_cache *probe_cache__new(const char *target);
+int probe_cache__add_entry(struct probe_cache *pcache,
+ struct perf_probe_event *pev,
+ struct probe_trace_event *tevs, int ntevs);
+int probe_cache__commit(struct probe_cache *pcache);
+void probe_cache__purge(struct probe_cache *pcache);
+void probe_cache__delete(struct probe_cache *pcache);
#endif