tool.h 1.4 KB

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