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;
31 #define PF_FL_UPROBE 1
33 #define for_each_probe_cache_entry(entry, pcache) \
34 list_for_each_entry(entry, &pcache->entries, node)
36 /* probe-file.c depends on libelf */
37 #ifdef HAVE_LIBELF_SUPPORT
38 int probe_file__open(int flag);
39 int probe_file__open_both(int *kfd, int *ufd, int flag);
40 struct strlist *probe_file__get_namelist(int fd);
41 struct strlist *probe_file__get_rawlist(int fd);
42 int probe_file__add_event(int fd, struct probe_trace_event *tev);
43 int probe_file__del_events(int fd, struct strfilter *filter);
44 int probe_file__get_events(int fd, struct strfilter *filter,
45 struct strlist *plist);
46 int probe_file__del_strlist(int fd, struct strlist *namelist);
48 int probe_cache_entry__get_event(struct probe_cache_entry *entry,
49 struct probe_trace_event **tevs);
51 struct probe_cache *probe_cache__new(const char *target);
52 int probe_cache__add_entry(struct probe_cache *pcache,
53 struct perf_probe_event *pev,
54 struct probe_trace_event *tevs, int ntevs);
55 int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname);
56 int probe_cache__commit(struct probe_cache *pcache);
57 void probe_cache__purge(struct probe_cache *pcache);
58 void probe_cache__delete(struct probe_cache *pcache);
59 int probe_cache__filter_purge(struct probe_cache *pcache,
60 struct strfilter *filter);
61 struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
62 struct perf_probe_event *pev);
63 struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
64 const char *group, const char *event);
65 int probe_cache__show_all_caches(struct strfilter *filter);
66 bool probe_type_is_available(enum probe_type type);
67 #else /* ! HAVE_LIBELF_SUPPORT */
68 static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused)
72 #define probe_cache__delete(pcache) do {} while (0)