data_map.h 959 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __PERF_DATAMAP_H
  2. #define __PERF_DATAMAP_H
  3. #include "event.h"
  4. #include "header.h"
  5. typedef int (*event_type_handler_t)(event_t *);
  6. struct perf_file_handler {
  7. event_type_handler_t process_sample_event;
  8. event_type_handler_t process_mmap_event;
  9. event_type_handler_t process_comm_event;
  10. event_type_handler_t process_fork_event;
  11. event_type_handler_t process_exit_event;
  12. event_type_handler_t process_lost_event;
  13. event_type_handler_t process_read_event;
  14. event_type_handler_t process_throttle_event;
  15. event_type_handler_t process_unthrottle_event;
  16. int (*sample_type_check)(u64 sample_type);
  17. unsigned long total_unknown;
  18. };
  19. void register_perf_file_handler(struct perf_file_handler *handler);
  20. int mmap_dispatch_perf_file(struct perf_header **pheader,
  21. const char *input_name,
  22. int force,
  23. int full_paths,
  24. int *cwdlen,
  25. char **cwd);
  26. int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
  27. #endif