xref: /linux/tools/perf/util/probe-file.h (revision 5dafea097ac65bd01cc86801c399ae41dce79756)
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 	struct perf_probe_event pev;
12 	char			*spev;
13 	struct strlist		*tevlist;
14 };
15 
16 struct probe_cache {
17 	int	fd;
18 	struct list_head entries;
19 };
20 
21 #define PF_FL_UPROBE	1
22 #define PF_FL_RW	2
23 
24 int probe_file__open(int flag);
25 int probe_file__open_both(int *kfd, int *ufd, int flag);
26 struct strlist *probe_file__get_namelist(int fd);
27 struct strlist *probe_file__get_rawlist(int fd);
28 int probe_file__add_event(int fd, struct probe_trace_event *tev);
29 int probe_file__del_events(int fd, struct strfilter *filter);
30 int probe_file__get_events(int fd, struct strfilter *filter,
31 				  struct strlist *plist);
32 int probe_file__del_strlist(int fd, struct strlist *namelist);
33 
34 struct probe_cache *probe_cache__new(const char *target);
35 int probe_cache__add_entry(struct probe_cache *pcache,
36 			   struct perf_probe_event *pev,
37 			   struct probe_trace_event *tevs, int ntevs);
38 int probe_cache__commit(struct probe_cache *pcache);
39 void probe_cache__purge(struct probe_cache *pcache);
40 void probe_cache__delete(struct probe_cache *pcache);
41 
42 #endif
43