6 #include "probe-event.h"
8 /* Cache of probe definitions */
9 struct probe_cache_entry {
10 struct list_head node;
12 struct perf_probe_event pev;
14 struct strlist *tevlist;
19 struct list_head entries;
22 #define PF_FL_UPROBE 1
24 #define for_each_probe_cache_entry(entry, pcache) \
25 list_for_each_entry(entry, &pcache->entries, node)
27 /* probe-file.c depends on libelf */
28 #ifdef HAVE_LIBELF_SUPPORT
29 int probe_file__open(int flag);
30 int probe_file__open_both(int *kfd, int *ufd, int flag);
31 struct strlist *probe_file__get_namelist(int fd);
32 struct strlist *probe_file__get_rawlist(int fd);
33 int probe_file__add_event(int fd, struct probe_trace_event *tev);
34 int probe_file__del_events(int fd, struct strfilter *filter);
35 int probe_file__get_events(int fd, struct strfilter *filter,
36 struct strlist *plist);
37 int probe_file__del_strlist(int fd, struct strlist *namelist);
39 int probe_cache_entry__get_event(struct probe_cache_entry *entry,
40 struct probe_trace_event **tevs);
42 struct probe_cache *probe_cache__new(const char *target);
43 int probe_cache__add_entry(struct probe_cache *pcache,
44 struct perf_probe_event *pev,
45 struct probe_trace_event *tevs, int ntevs);
46 int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname);
47 int probe_cache__commit(struct probe_cache *pcache);
48 void probe_cache__purge(struct probe_cache *pcache);
49 void probe_cache__delete(struct probe_cache *pcache);
50 int probe_cache__filter_purge(struct probe_cache *pcache,
51 struct strfilter *filter);
52 struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
53 struct perf_probe_event *pev);
54 struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
55 const char *group, const char *event);
56 int probe_cache__show_all_caches(struct strfilter *filter);
57 #else /* ! HAVE_LIBELF_SUPPORT */
58 static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused)
62 #define probe_cache__delete(pcache) do {} while (0)