tool.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __PERF_TOOL_H
  2. #define __PERF_TOOL_H
  3. #include <stdbool.h>
  4. struct perf_session;
  5. union perf_event;
  6. struct perf_evlist;
  7. struct perf_evsel;
  8. struct perf_sample;
  9. struct perf_tool;
  10. struct machine;
  11. struct ordered_events;
  12. typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
  13. struct perf_sample *sample,
  14. struct perf_evsel *evsel, struct machine *machine);
  15. typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
  16. struct perf_sample *sample, struct machine *machine);
  17. typedef int (*event_attr_op)(struct perf_tool *tool,
  18. union perf_event *event,
  19. struct perf_evlist **pevlist);
  20. typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
  21. struct perf_session *session);
  22. typedef int (*event_oe)(struct perf_tool *tool, union perf_event *event,
  23. struct ordered_events *oe);
  24. struct perf_tool {
  25. event_sample sample,
  26. read;
  27. event_op mmap,
  28. mmap2,
  29. comm,
  30. fork,
  31. exit,
  32. lost,
  33. throttle,
  34. unthrottle;
  35. event_attr_op attr;
  36. event_op2 tracing_data;
  37. event_oe finished_round;
  38. event_op2 build_id,
  39. id_index;
  40. bool ordered_events;
  41. bool ordering_requires_timestamps;
  42. };
  43. #endif /* __PERF_TOOL_H */