probe-file.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef __PROBE_FILE_H
  2. #define __PROBE_FILE_H
  3. #include "strlist.h"
  4. #include "strfilter.h"
  5. #include "probe-event.h"
  6. /* Cache of probe definitions */
  7. struct probe_cache_entry {
  8. struct list_head node;
  9. bool sdt;
  10. struct perf_probe_event pev;
  11. char *spev;
  12. struct strlist *tevlist;
  13. };
  14. struct probe_cache {
  15. int fd;
  16. struct list_head entries;
  17. };
  18. #define PF_FL_UPROBE 1
  19. #define PF_FL_RW 2
  20. int probe_file__open(int flag);
  21. int probe_file__open_both(int *kfd, int *ufd, int flag);
  22. struct strlist *probe_file__get_namelist(int fd);
  23. struct strlist *probe_file__get_rawlist(int fd);
  24. int probe_file__add_event(int fd, struct probe_trace_event *tev);
  25. int probe_file__del_events(int fd, struct strfilter *filter);
  26. int probe_file__get_events(int fd, struct strfilter *filter,
  27. struct strlist *plist);
  28. int probe_file__del_strlist(int fd, struct strlist *namelist);
  29. struct probe_cache *probe_cache__new(const char *target);
  30. int probe_cache__add_entry(struct probe_cache *pcache,
  31. struct perf_probe_event *pev,
  32. struct probe_trace_event *tevs, int ntevs);
  33. int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname);
  34. int probe_cache__commit(struct probe_cache *pcache);
  35. void probe_cache__purge(struct probe_cache *pcache);
  36. void probe_cache__delete(struct probe_cache *pcache);
  37. int probe_cache__filter_purge(struct probe_cache *pcache,
  38. struct strfilter *filter);
  39. struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
  40. struct perf_probe_event *pev);
  41. struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
  42. const char *group, const char *event);
  43. int probe_cache__show_all_caches(struct strfilter *filter);
  44. #endif