aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/x86/util/pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/x86/util/pmu.c')
-rw-r--r--tools/perf/arch/x86/util/pmu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c
new file mode 100644
index 000000000000..fd11cc3ce780
--- /dev/null
+++ b/tools/perf/arch/x86/util/pmu.c
@@ -0,0 +1,15 @@
+#include <string.h>
+
+#include <linux/perf_event.h>
+
+#include "../../util/intel-pt.h"
+#include "../../util/pmu.h"
+
+struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
+{
+#ifdef HAVE_AUXTRACE_SUPPORT
+ if (!strcmp(pmu->name, INTEL_PT_PMU_NAME))
+ return intel_pt_pmu_default_config(pmu);
+#endif
+ return NULL;
+}