perf probe: Search SDT/cached event from all probe caches
[deliverable/linux.git] / tools / perf / util / probe-file.h
1 #ifndef __PROBE_FILE_H
2 #define __PROBE_FILE_H
3
4 #include "strlist.h"
5 #include "strfilter.h"
6 #include "probe-event.h"
7
8 /* Cache of probe definitions */
9 struct probe_cache_entry {
10 struct list_head node;
11 bool sdt;
12 struct perf_probe_event pev;
13 char *spev;
14 struct strlist *tevlist;
15 };
16
17 struct probe_cache {
18 int fd;
19 struct list_head entries;
20 };
21
22 #define PF_FL_UPROBE 1
23 #define PF_FL_RW 2
24 #define for_each_probe_cache_entry(entry, pcache) \
25 list_for_each_entry(entry, &pcache->entries, node)
26
27 int probe_file__open(int flag);
28 int probe_file__open_both(int *kfd, int *ufd, int flag);
29 struct strlist *probe_file__get_namelist(int fd);
30 struct strlist *probe_file__get_rawlist(int fd);
31 int probe_file__add_event(int fd, struct probe_trace_event *tev);
32 int probe_file__del_events(int fd, struct strfilter *filter);
33 int probe_file__get_events(int fd, struct strfilter *filter,
34 struct strlist *plist);
35 int probe_file__del_strlist(int fd, struct strlist *namelist);
36
37 int probe_cache_entry__get_event(struct probe_cache_entry *entry,
38 struct probe_trace_event **tevs);
39
40 struct probe_cache *probe_cache__new(const char *target);
41 int probe_cache__add_entry(struct probe_cache *pcache,
42 struct perf_probe_event *pev,
43 struct probe_trace_event *tevs, int ntevs);
44 int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname);
45 int probe_cache__commit(struct probe_cache *pcache);
46 void probe_cache__purge(struct probe_cache *pcache);
47 void probe_cache__delete(struct probe_cache *pcache);
48 int probe_cache__filter_purge(struct probe_cache *pcache,
49 struct strfilter *filter);
50 struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
51 struct perf_probe_event *pev);
52 struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
53 const char *group, const char *event);
54 int probe_cache__show_all_caches(struct strfilter *filter);
55 #endif
This page took 0.032863 seconds and 6 git commands to generate.