perf_event.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * linux/arch/arm/include/asm/perf_event.h
  3. *
  4. * Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. */
  11. #ifndef __ARM_PERF_EVENT_H__
  12. #define __ARM_PERF_EVENT_H__
  13. /*
  14. * NOP: on *most* (read: all supported) ARM platforms, the performance
  15. * counter interrupts are regular interrupts and not an NMI. This
  16. * means that when we receive the interrupt we can call
  17. * perf_event_do_pending() that handles all of the work with
  18. * interrupts disabled.
  19. */
  20. static inline void
  21. set_perf_event_pending(void)
  22. {
  23. }
  24. /* ARM performance counters start from 1 (in the cp15 accesses) so use the
  25. * same indexes here for consistency. */
  26. #define PERF_EVENT_INDEX_OFFSET 1
  27. /* ARM perf PMU IDs for use by internal perf clients. */
  28. enum arm_perf_pmu_ids {
  29. ARM_PERF_PMU_ID_XSCALE1 = 0,
  30. ARM_PERF_PMU_ID_XSCALE2,
  31. ARM_PERF_PMU_ID_V6,
  32. ARM_PERF_PMU_ID_V6MP,
  33. ARM_PERF_PMU_ID_CA8,
  34. ARM_PERF_PMU_ID_CA9,
  35. ARM_NUM_PMU_IDS,
  36. };
  37. extern enum arm_perf_pmu_ids
  38. armpmu_get_pmu_id(void);
  39. extern int
  40. armpmu_get_max_events(void);
  41. #endif /* __ARM_PERF_EVENT_H__ */