tool.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. mmap2,
  26. comm,
  27. fork,
  28. exit,
  29. lost,
  30. throttle,
  31. unthrottle;
  32. event_attr_op attr;
  33. event_op2 tracing_data;
  34. event_op2 finished_round,
  35. build_id;
  36. bool ordered_samples;
  37. bool ordering_requires_timestamps;
  38. };
  39. #endif /* __PERF_TOOL_H */