pmu.c 450 B

12345678910111213141516171819
  1. #include <string.h>
  2. #include <linux/perf_event.h>
  3. #include "../../util/intel-pt.h"
  4. #include "../../util/intel-bts.h"
  5. #include "../../util/pmu.h"
  6. struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
  7. {
  8. #ifdef HAVE_AUXTRACE_SUPPORT
  9. if (!strcmp(pmu->name, INTEL_PT_PMU_NAME))
  10. return intel_pt_pmu_default_config(pmu);
  11. if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME))
  12. pmu->selectable = true;
  13. #endif
  14. return NULL;
  15. }