hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/tools/perf/arch/x86/util/auxtrace.c
....@@ -1,46 +1,41 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * auxtrace.c: AUX area tracing support
34 * Copyright (c) 2013-2014, Intel Corporation.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms and conditions of the GNU General Public License,
7
- * version 2, as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
145 */
156
167 #include <errno.h>
178 #include <stdbool.h>
189
19
-#include "../../util/header.h"
20
-#include "../../util/debug.h"
21
-#include "../../util/pmu.h"
22
-#include "../../util/auxtrace.h"
23
-#include "../../util/intel-pt.h"
24
-#include "../../util/intel-bts.h"
25
-#include "../../util/evlist.h"
10
+#include "../../../util/header.h"
11
+#include "../../../util/debug.h"
12
+#include "../../../util/pmu.h"
13
+#include "../../../util/auxtrace.h"
14
+#include "../../../util/intel-pt.h"
15
+#include "../../../util/intel-bts.h"
16
+#include "../../../util/evlist.h"
2617
2718 static
28
-struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
19
+struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
2920 int *err)
3021 {
3122 struct perf_pmu *intel_pt_pmu;
3223 struct perf_pmu *intel_bts_pmu;
33
- struct perf_evsel *evsel;
24
+ struct evsel *evsel;
3425 bool found_pt = false;
3526 bool found_bts = false;
3627
3728 intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME);
29
+ if (intel_pt_pmu)
30
+ intel_pt_pmu->auxtrace = true;
3831 intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);
32
+ if (intel_bts_pmu)
33
+ intel_bts_pmu->auxtrace = true;
3934
4035 evlist__for_each_entry(evlist, evsel) {
41
- if (intel_pt_pmu && evsel->attr.type == intel_pt_pmu->type)
36
+ if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
4237 found_pt = true;
43
- if (intel_bts_pmu && evsel->attr.type == intel_bts_pmu->type)
38
+ if (intel_bts_pmu && evsel->core.attr.type == intel_bts_pmu->type)
4439 found_bts = true;
4540 }
4641
....@@ -59,7 +54,7 @@
5954 return NULL;
6055 }
6156
62
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
57
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
6358 int *err)
6459 {
6560 char buffer[64];