.. | .. |
---|
1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
---|
2 | 2 | #include <inttypes.h> |
---|
3 | | -#include "perf.h" |
---|
4 | 3 | #include "util/debug.h" |
---|
| 4 | +#include "util/dso.h" |
---|
| 5 | +#include "util/event.h" // struct perf_sample |
---|
| 6 | +#include "util/map.h" |
---|
5 | 7 | #include "util/symbol.h" |
---|
6 | 8 | #include "util/sort.h" |
---|
7 | 9 | #include "util/evsel.h" |
---|
8 | | -#include "util/evlist.h" |
---|
9 | 10 | #include "util/machine.h" |
---|
10 | 11 | #include "util/thread.h" |
---|
11 | 12 | #include "tests/hists_common.h" |
---|
12 | 13 | #include <linux/kernel.h> |
---|
| 14 | +#include <linux/perf_event.h> |
---|
13 | 15 | |
---|
14 | 16 | static struct { |
---|
15 | 17 | u32 pid; |
---|
.. | .. |
---|
161 | 163 | void print_hists_in(struct hists *hists) |
---|
162 | 164 | { |
---|
163 | 165 | int i = 0; |
---|
164 | | - struct rb_root *root; |
---|
| 166 | + struct rb_root_cached *root; |
---|
165 | 167 | struct rb_node *node; |
---|
166 | 168 | |
---|
167 | 169 | if (hists__has(hists, need_collapse)) |
---|
.. | .. |
---|
170 | 172 | root = hists->entries_in; |
---|
171 | 173 | |
---|
172 | 174 | pr_info("----- %s --------\n", __func__); |
---|
173 | | - node = rb_first(root); |
---|
| 175 | + node = rb_first_cached(root); |
---|
174 | 176 | while (node) { |
---|
175 | 177 | struct hist_entry *he; |
---|
176 | 178 | |
---|
.. | .. |
---|
191 | 193 | void print_hists_out(struct hists *hists) |
---|
192 | 194 | { |
---|
193 | 195 | int i = 0; |
---|
194 | | - struct rb_root *root; |
---|
| 196 | + struct rb_root_cached *root; |
---|
195 | 197 | struct rb_node *node; |
---|
196 | 198 | |
---|
197 | 199 | root = &hists->entries; |
---|
198 | 200 | |
---|
199 | 201 | pr_info("----- %s --------\n", __func__); |
---|
200 | | - node = rb_first(root); |
---|
| 202 | + node = rb_first_cached(root); |
---|
201 | 203 | while (node) { |
---|
202 | 204 | struct hist_entry *he; |
---|
203 | 205 | |
---|