tool.h 1.2 KB

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