hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/tools/perf/arch/s390/util/auxtrace.c
....@@ -1,12 +1,15 @@
11 #include <stdbool.h>
2
+#include <stdlib.h>
23 #include <linux/kernel.h>
34 #include <linux/types.h>
45 #include <linux/bitops.h>
56 #include <linux/log2.h>
7
+#include <linux/zalloc.h>
68
79 #include "../../util/evlist.h"
810 #include "../../util/auxtrace.h"
911 #include "../../util/evsel.h"
12
+#include "../../util/record.h"
1013
1114 #define PERF_EVENT_CPUM_SF 0xB0000 /* Event: Basic-sampling */
1215 #define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */
....@@ -19,7 +22,7 @@
1922 }
2023
2124 static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused,
22
- struct perf_evlist *evlist __maybe_unused)
25
+ struct evlist *evlist __maybe_unused)
2326 {
2427 return 0;
2528 }
....@@ -27,7 +30,7 @@
2730 static int
2831 cpumsf_info_fill(struct auxtrace_record *itr __maybe_unused,
2932 struct perf_session *session __maybe_unused,
30
- struct auxtrace_info_event *auxtrace_info __maybe_unused,
33
+ struct perf_record_auxtrace_info *auxtrace_info __maybe_unused,
3134 size_t priv_size __maybe_unused)
3235 {
3336 auxtrace_info->type = PERF_AUXTRACE_S390_CPUMSF;
....@@ -42,7 +45,7 @@
4245
4346 static int
4447 cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused,
45
- struct perf_evlist *evlist __maybe_unused,
48
+ struct evlist *evlist __maybe_unused,
4649 struct record_opts *opts)
4750 {
4851 unsigned int factor = 1;
....@@ -81,19 +84,19 @@
8184 * auxtrace_record__init is called when perf record
8285 * check if the event really need auxtrace
8386 */
84
-struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
87
+struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
8588 int *err)
8689 {
8790 struct auxtrace_record *aux;
88
- struct perf_evsel *pos;
91
+ struct evsel *pos;
8992 int diagnose = 0;
9093
9194 *err = 0;
92
- if (evlist->nr_entries == 0)
95
+ if (evlist->core.nr_entries == 0)
9396 return NULL;
9497
9598 evlist__for_each_entry(evlist, pos) {
96
- if (pos->attr.config == PERF_EVENT_CPUM_SF_DIAG) {
99
+ if (pos->core.attr.config == PERF_EVENT_CPUM_SF_DIAG) {
97100 diagnose = 1;
98101 break;
99102 }