pmu-events.h 881 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef PMU_EVENTS_H
  2. #define PMU_EVENTS_H
  3. /*
  4. * Describe each PMU event. Each CPU has a table of PMU events.
  5. */
  6. struct pmu_event {
  7. const char *name;
  8. const char *event;
  9. const char *desc;
  10. const char *topic;
  11. const char *long_desc;
  12. };
  13. /*
  14. *
  15. * Map a CPU to its table of PMU events. The CPU is identified by the
  16. * cpuid field, which is an arch-specific identifier for the CPU.
  17. * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile
  18. * must match the get_cpustr() in tools/perf/arch/xxx/util/header.c)
  19. *
  20. * The cpuid can contain any character other than the comma.
  21. */
  22. struct pmu_events_map {
  23. const char *cpuid;
  24. const char *version;
  25. const char *type; /* core, uncore etc */
  26. struct pmu_event *table;
  27. };
  28. /*
  29. * Global table mapping each known CPU for the architecture to its
  30. * table of PMU events.
  31. */
  32. extern struct pmu_events_map pmu_events_map[];
  33. #endif