Linux Perf
pmu.c
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0
2 #include <string.h>
3 
4 #include <linux/perf_event.h>
5 
6 #include "../../util/intel-pt.h"
7 #include "../../util/intel-bts.h"
8 #include "../../util/pmu.h"
9 
10 struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
11 {
12 #ifdef HAVE_AUXTRACE_SUPPORT
13  if (!strcmp(pmu->name, INTEL_PT_PMU_NAME))
14  return intel_pt_pmu_default_config(pmu);
15  if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME))
16  pmu->selectable = true;
17 #endif
18  return NULL;
19 }
#define INTEL_BTS_PMU_NAME
Definition: intel-bts.h:19
Definition: pmu.h:22
#define INTEL_PT_PMU_NAME
Definition: intel-pt.h:19
struct perf_event_attr * perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
Definition: pmu.c:16
struct perf_event_attr * intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
Definition: intel-pt.c:264