perf_event.h 758 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __ASM_SH_PERF_EVENT_H
  2. #define __ASM_SH_PERF_EVENT_H
  3. struct hw_perf_event;
  4. #define MAX_HWEVENTS 2
  5. struct sh_pmu {
  6. const char *name;
  7. unsigned int num_events;
  8. void (*disable_all)(void);
  9. void (*enable_all)(void);
  10. void (*enable)(struct hw_perf_event *, int);
  11. void (*disable)(struct hw_perf_event *, int);
  12. u64 (*read)(int);
  13. int (*event_map)(int);
  14. unsigned int max_events;
  15. unsigned long raw_event_mask;
  16. const int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]
  17. [PERF_COUNT_HW_CACHE_OP_MAX]
  18. [PERF_COUNT_HW_CACHE_RESULT_MAX];
  19. };
  20. /* arch/sh/kernel/perf_event.c */
  21. extern int register_sh_pmu(struct sh_pmu *);
  22. extern int reserve_pmc_hardware(void);
  23. extern void release_pmc_hardware(void);
  24. #endif /* __ASM_SH_PERF_EVENT_H */