tool.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_simple_op)(struct perf_tool *tool, union perf_event *event);
  20. typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
  21. struct perf_session *session);
  22. struct perf_tool {
  23. event_sample sample,
  24. read;
  25. event_op mmap,
  26. comm,
  27. fork,
  28. exit,
  29. lost,
  30. throttle,
  31. unthrottle;
  32. event_attr_op attr;
  33. event_op2 tracing_data;
  34. event_simple_op event_type;
  35. event_op2 finished_round,
  36. build_id;
  37. bool ordered_samples;
  38. bool ordering_requires_timestamps;
  39. };
  40. #endif /* __PERF_TOOL_H */