| .. | .. |
|---|
| 1 | 1 | #include <stdbool.h> |
|---|
| 2 | +#include <stdlib.h> |
|---|
| 2 | 3 | #include <linux/kernel.h> |
|---|
| 3 | 4 | #include <linux/types.h> |
|---|
| 4 | 5 | #include <linux/bitops.h> |
|---|
| 5 | 6 | #include <linux/log2.h> |
|---|
| 7 | +#include <linux/zalloc.h> |
|---|
| 6 | 8 | |
|---|
| 7 | 9 | #include "../../util/evlist.h" |
|---|
| 8 | 10 | #include "../../util/auxtrace.h" |
|---|
| 9 | 11 | #include "../../util/evsel.h" |
|---|
| 12 | +#include "../../util/record.h" |
|---|
| 10 | 13 | |
|---|
| 11 | 14 | #define PERF_EVENT_CPUM_SF 0xB0000 /* Event: Basic-sampling */ |
|---|
| 12 | 15 | #define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */ |
|---|
| .. | .. |
|---|
| 19 | 22 | } |
|---|
| 20 | 23 | |
|---|
| 21 | 24 | 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) |
|---|
| 23 | 26 | { |
|---|
| 24 | 27 | return 0; |
|---|
| 25 | 28 | } |
|---|
| .. | .. |
|---|
| 27 | 30 | static int |
|---|
| 28 | 31 | cpumsf_info_fill(struct auxtrace_record *itr __maybe_unused, |
|---|
| 29 | 32 | 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, |
|---|
| 31 | 34 | size_t priv_size __maybe_unused) |
|---|
| 32 | 35 | { |
|---|
| 33 | 36 | auxtrace_info->type = PERF_AUXTRACE_S390_CPUMSF; |
|---|
| .. | .. |
|---|
| 42 | 45 | |
|---|
| 43 | 46 | static int |
|---|
| 44 | 47 | cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused, |
|---|
| 45 | | - struct perf_evlist *evlist __maybe_unused, |
|---|
| 48 | + struct evlist *evlist __maybe_unused, |
|---|
| 46 | 49 | struct record_opts *opts) |
|---|
| 47 | 50 | { |
|---|
| 48 | 51 | unsigned int factor = 1; |
|---|
| .. | .. |
|---|
| 81 | 84 | * auxtrace_record__init is called when perf record |
|---|
| 82 | 85 | * check if the event really need auxtrace |
|---|
| 83 | 86 | */ |
|---|
| 84 | | -struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist, |
|---|
| 87 | +struct auxtrace_record *auxtrace_record__init(struct evlist *evlist, |
|---|
| 85 | 88 | int *err) |
|---|
| 86 | 89 | { |
|---|
| 87 | 90 | struct auxtrace_record *aux; |
|---|
| 88 | | - struct perf_evsel *pos; |
|---|
| 91 | + struct evsel *pos; |
|---|
| 89 | 92 | int diagnose = 0; |
|---|
| 90 | 93 | |
|---|
| 91 | 94 | *err = 0; |
|---|
| 92 | | - if (evlist->nr_entries == 0) |
|---|
| 95 | + if (evlist->core.nr_entries == 0) |
|---|
| 93 | 96 | return NULL; |
|---|
| 94 | 97 | |
|---|
| 95 | 98 | 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) { |
|---|
| 97 | 100 | diagnose = 1; |
|---|
| 98 | 101 | break; |
|---|
| 99 | 102 | } |
|---|