tool.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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_attr_op event_update;
  44. event_op2 tracing_data;
  45. event_oe finished_round;
  46. event_op2 build_id,
  47. id_index,
  48. auxtrace_info,
  49. auxtrace_error,
  50. time_conv,
  51. thread_map,
  52. cpu_map,
  53. stat_config,
  54. stat,
  55. stat_round;
  56. event_op3 auxtrace;
  57. bool ordered_events;
  58. bool ordering_requires_timestamps;
  59. };
  60. #endif /* __PERF_TOOL_H */