tool.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
  12. struct perf_sample *sample,
  13. struct perf_evsel *evsel, struct machine *machine);
  14. typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
  15. struct perf_sample *sample, struct machine *machine);
  16. typedef int (*event_attr_op)(struct perf_tool *tool,
  17. union perf_event *event,
  18. struct perf_evlist **pevlist);
  19. typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
  20. struct perf_session *session);
  21. struct perf_tool {
  22. event_sample sample,
  23. read;
  24. event_op mmap,
  25. comm,
  26. fork,
  27. exit,
  28. lost,
  29. throttle,
  30. unthrottle;
  31. event_attr_op attr;
  32. event_op2 tracing_data;
  33. event_op2 finished_round,
  34. build_id;
  35. bool ordered_samples;
  36. bool ordering_requires_timestamps;
  37. };
  38. #endif /* __PERF_TOOL_H */