| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | | -#include "perf.h" |
|---|
| 3 | 2 | #include "tests.h" |
|---|
| 4 | 3 | #include "debug.h" |
|---|
| 5 | 4 | #include "symbol.h" |
|---|
| .. | .. |
|---|
| 7 | 6 | #include "evsel.h" |
|---|
| 8 | 7 | #include "evlist.h" |
|---|
| 9 | 8 | #include "machine.h" |
|---|
| 10 | | -#include "thread.h" |
|---|
| 11 | 9 | #include "parse-events.h" |
|---|
| 12 | 10 | #include "hists_common.h" |
|---|
| 11 | +#include "util/mmap.h" |
|---|
| 13 | 12 | #include <errno.h> |
|---|
| 14 | 13 | #include <linux/kernel.h> |
|---|
| 15 | 14 | |
|---|
| .. | .. |
|---|
| 62 | 61 | }, |
|---|
| 63 | 62 | }; |
|---|
| 64 | 63 | |
|---|
| 65 | | -static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine) |
|---|
| 64 | +static int add_hist_entries(struct evlist *evlist, struct machine *machine) |
|---|
| 66 | 65 | { |
|---|
| 67 | | - struct perf_evsel *evsel; |
|---|
| 66 | + struct evsel *evsel; |
|---|
| 68 | 67 | struct addr_location al; |
|---|
| 69 | 68 | struct hist_entry *he; |
|---|
| 70 | 69 | struct perf_sample sample = { .period = 1, .weight = 1, }; |
|---|
| .. | .. |
|---|
| 142 | 141 | static int __validate_match(struct hists *hists) |
|---|
| 143 | 142 | { |
|---|
| 144 | 143 | size_t count = 0; |
|---|
| 145 | | - struct rb_root *root; |
|---|
| 144 | + struct rb_root_cached *root; |
|---|
| 146 | 145 | struct rb_node *node; |
|---|
| 147 | 146 | |
|---|
| 148 | 147 | /* |
|---|
| .. | .. |
|---|
| 153 | 152 | else |
|---|
| 154 | 153 | root = hists->entries_in; |
|---|
| 155 | 154 | |
|---|
| 156 | | - node = rb_first(root); |
|---|
| 155 | + node = rb_first_cached(root); |
|---|
| 157 | 156 | while (node) { |
|---|
| 158 | 157 | struct hist_entry *he; |
|---|
| 159 | 158 | |
|---|
| .. | .. |
|---|
| 192 | 191 | size_t count = 0; |
|---|
| 193 | 192 | size_t count_pair = 0; |
|---|
| 194 | 193 | size_t count_dummy = 0; |
|---|
| 195 | | - struct rb_root *root; |
|---|
| 194 | + struct rb_root_cached *root; |
|---|
| 196 | 195 | struct rb_node *node; |
|---|
| 197 | 196 | |
|---|
| 198 | 197 | /* |
|---|
| .. | .. |
|---|
| 205 | 204 | else |
|---|
| 206 | 205 | root = hists->entries_in; |
|---|
| 207 | 206 | |
|---|
| 208 | | - node = rb_first(root); |
|---|
| 207 | + node = rb_first_cached(root); |
|---|
| 209 | 208 | while (node) { |
|---|
| 210 | 209 | struct hist_entry *he; |
|---|
| 211 | 210 | |
|---|
| .. | .. |
|---|
| 271 | 270 | struct hists *hists, *first_hists; |
|---|
| 272 | 271 | struct machines machines; |
|---|
| 273 | 272 | struct machine *machine = NULL; |
|---|
| 274 | | - struct perf_evsel *evsel, *first; |
|---|
| 275 | | - struct perf_evlist *evlist = perf_evlist__new(); |
|---|
| 273 | + struct evsel *evsel, *first; |
|---|
| 274 | + struct evlist *evlist = evlist__new(); |
|---|
| 276 | 275 | |
|---|
| 277 | 276 | if (evlist == NULL) |
|---|
| 278 | 277 | return -ENOMEM; |
|---|
| .. | .. |
|---|
| 312 | 311 | print_hists_in(hists); |
|---|
| 313 | 312 | } |
|---|
| 314 | 313 | |
|---|
| 315 | | - first = perf_evlist__first(evlist); |
|---|
| 316 | | - evsel = perf_evlist__last(evlist); |
|---|
| 314 | + first = evlist__first(evlist); |
|---|
| 315 | + evsel = evlist__last(evlist); |
|---|
| 317 | 316 | |
|---|
| 318 | 317 | first_hists = evsel__hists(first); |
|---|
| 319 | 318 | hists = evsel__hists(evsel); |
|---|
| .. | .. |
|---|
| 334 | 333 | |
|---|
| 335 | 334 | out: |
|---|
| 336 | 335 | /* tear down everything */ |
|---|
| 337 | | - perf_evlist__delete(evlist); |
|---|
| 336 | + evlist__delete(evlist); |
|---|
| 338 | 337 | reset_output_field(); |
|---|
| 339 | 338 | machines__exit(&machines); |
|---|
| 340 | 339 | |
|---|