b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include <string.h> |
| 3 | |
| 4 | #include <linux/stddef.h> |
| 5 | #include <linux/perf_event.h> |
| 6 | |
| 7 | #include "../../util/intel-pt.h" |
| 8 | #include "../../util/intel-bts.h" |
| 9 | #include "../../util/pmu.h" |
| 10 | |
| 11 | struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused) |
| 12 | { |
| 13 | #ifdef HAVE_AUXTRACE_SUPPORT |
| 14 | if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) |
| 15 | return intel_pt_pmu_default_config(pmu); |
| 16 | if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME)) |
| 17 | pmu->selectable = true; |
| 18 | #endif |
| 19 | return NULL; |
| 20 | } |