4 #include "probe-event.h"
9 /* Cache of probe definitions */
10 struct probe_cache_entry {
11 struct list_head node;
13 struct perf_probe_event pev;
15 struct strlist *tevlist;
20 struct list_head entries;
32 #define PF_FL_UPROBE 1
34 #define for_each_probe_cache_entry(entry, pcache) \
35 list_for_each_entry(entry, &pcache->entries, node)
37 /* probe-file.c depends on libelf */
38 #ifdef HAVE_LIBELF_SUPPORT
39 int open_trace_file(const char *trace_file, bool readwrite);
40 int probe_file__open(int flag);
41 int probe_file__open_both(int *kfd, int *ufd, int flag);
42 struct strlist *probe_file__get_namelist(int fd);
43 struct strlist *probe_file__get_rawlist(int fd);
44 int probe_file__add_event(int fd, struct probe_trace_event *tev);
46 int probe_file__del_events(int fd, struct strfilter *filter);
47 int probe_file__get_events(int fd, struct strfilter *filter,
48 struct strlist *plist);
49 int probe_file__del_strlist(int fd, struct strlist *namelist);
51 int probe_cache_entry__get_event(struct probe_cache_entry *entry,
52 struct probe_trace_event **tevs);
54 struct probe_cache *probe_cache__new(const char *target);
55 int probe_cache__add_entry(struct probe_cache *pcache,
56 struct perf_probe_event *pev,
57 struct probe_trace_event *tevs, int ntevs);
58 int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname);
59 int probe_cache__commit(struct probe_cache *pcache);
60 void probe_cache__purge(struct probe_cache *pcache);
61 void probe_cache__delete(struct probe_cache *pcache);
62 int probe_cache__filter_purge(struct probe_cache *pcache,
63 struct strfilter *filter);
64 struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
65 struct perf_probe_event *pev);
66 struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
67 const char *group, const char *event);
68 int probe_cache__show_all_caches(struct strfilter *filter);
69 bool probe_type_is_available(enum probe_type type);
70 bool kretprobe_offset_is_supported(void);
71 #else /* ! HAVE_LIBELF_SUPPORT */
72 static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused)
76 #define probe_cache__delete(pcache) do {} while (0)