diff options
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index e0aa14faf2b5..4e4d2e76232e 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -24,15 +24,17 @@ | |||
24 | #include "util/event.h" | 24 | #include "util/event.h" |
25 | #include <subcmd/parse-options.h> | 25 | #include <subcmd/parse-options.h> |
26 | #include "util/parse-events.h" | 26 | #include "util/parse-events.h" |
27 | #include "util/thread.h" | ||
28 | #include "util/sort.h" | 27 | #include "util/sort.h" |
29 | #include "util/hist.h" | 28 | #include "util/hist.h" |
29 | #include "util/dso.h" | ||
30 | #include "util/map.h" | 30 | #include "util/map.h" |
31 | #include "util/session.h" | 31 | #include "util/session.h" |
32 | #include "util/tool.h" | 32 | #include "util/tool.h" |
33 | #include "util/data.h" | 33 | #include "util/data.h" |
34 | #include "arch/common.h" | 34 | #include "arch/common.h" |
35 | #include "util/block-range.h" | 35 | #include "util/block-range.h" |
36 | #include "util/map_symbol.h" | ||
37 | #include "util/branch.h" | ||
36 | 38 | ||
37 | #include <dlfcn.h> | 39 | #include <dlfcn.h> |
38 | #include <errno.h> | 40 | #include <errno.h> |
@@ -156,7 +158,7 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter, | |||
156 | struct hist_entry *he = iter->he; | 158 | struct hist_entry *he = iter->he; |
157 | struct branch_info *bi; | 159 | struct branch_info *bi; |
158 | struct perf_sample *sample = iter->sample; | 160 | struct perf_sample *sample = iter->sample; |
159 | struct perf_evsel *evsel = iter->evsel; | 161 | struct evsel *evsel = iter->evsel; |
160 | int err; | 162 | int err; |
161 | 163 | ||
162 | bi = he->branch_info; | 164 | bi = he->branch_info; |
@@ -171,7 +173,7 @@ out: | |||
171 | return err; | 173 | return err; |
172 | } | 174 | } |
173 | 175 | ||
174 | static int process_branch_callback(struct perf_evsel *evsel, | 176 | static int process_branch_callback(struct evsel *evsel, |
175 | struct perf_sample *sample, | 177 | struct perf_sample *sample, |
176 | struct addr_location *al __maybe_unused, | 178 | struct addr_location *al __maybe_unused, |
177 | struct perf_annotate *ann, | 179 | struct perf_annotate *ann, |
@@ -208,7 +210,7 @@ static bool has_annotation(struct perf_annotate *ann) | |||
208 | return ui__has_annotation() || ann->use_stdio2; | 210 | return ui__has_annotation() || ann->use_stdio2; |
209 | } | 211 | } |
210 | 212 | ||
211 | static int perf_evsel__add_sample(struct perf_evsel *evsel, | 213 | static int perf_evsel__add_sample(struct evsel *evsel, |
212 | struct perf_sample *sample, | 214 | struct perf_sample *sample, |
213 | struct addr_location *al, | 215 | struct addr_location *al, |
214 | struct perf_annotate *ann, | 216 | struct perf_annotate *ann, |
@@ -257,7 +259,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel, | |||
257 | static int process_sample_event(struct perf_tool *tool, | 259 | static int process_sample_event(struct perf_tool *tool, |
258 | union perf_event *event, | 260 | union perf_event *event, |
259 | struct perf_sample *sample, | 261 | struct perf_sample *sample, |
260 | struct perf_evsel *evsel, | 262 | struct evsel *evsel, |
261 | struct machine *machine) | 263 | struct machine *machine) |
262 | { | 264 | { |
263 | struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); | 265 | struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); |
@@ -293,7 +295,7 @@ static int process_feature_event(struct perf_session *session, | |||
293 | } | 295 | } |
294 | 296 | ||
295 | static int hist_entry__tty_annotate(struct hist_entry *he, | 297 | static int hist_entry__tty_annotate(struct hist_entry *he, |
296 | struct perf_evsel *evsel, | 298 | struct evsel *evsel, |
297 | struct perf_annotate *ann) | 299 | struct perf_annotate *ann) |
298 | { | 300 | { |
299 | if (!ann->use_stdio2) | 301 | if (!ann->use_stdio2) |
@@ -303,7 +305,7 @@ static int hist_entry__tty_annotate(struct hist_entry *he, | |||
303 | } | 305 | } |
304 | 306 | ||
305 | static void hists__find_annotations(struct hists *hists, | 307 | static void hists__find_annotations(struct hists *hists, |
306 | struct perf_evsel *evsel, | 308 | struct evsel *evsel, |
307 | struct perf_annotate *ann) | 309 | struct perf_annotate *ann) |
308 | { | 310 | { |
309 | struct rb_node *nd = rb_first_cached(&hists->entries), *next; | 311 | struct rb_node *nd = rb_first_cached(&hists->entries), *next; |
@@ -333,7 +335,7 @@ find_next: | |||
333 | if (use_browser == 2) { | 335 | if (use_browser == 2) { |
334 | int ret; | 336 | int ret; |
335 | int (*annotate)(struct hist_entry *he, | 337 | int (*annotate)(struct hist_entry *he, |
336 | struct perf_evsel *evsel, | 338 | struct evsel *evsel, |
337 | struct hist_browser_timer *hbt); | 339 | struct hist_browser_timer *hbt); |
338 | 340 | ||
339 | annotate = dlsym(perf_gtk_handle, | 341 | annotate = dlsym(perf_gtk_handle, |
@@ -387,7 +389,7 @@ static int __cmd_annotate(struct perf_annotate *ann) | |||
387 | { | 389 | { |
388 | int ret; | 390 | int ret; |
389 | struct perf_session *session = ann->session; | 391 | struct perf_session *session = ann->session; |
390 | struct perf_evsel *pos; | 392 | struct evsel *pos; |
391 | u64 total_nr_samples; | 393 | u64 total_nr_samples; |
392 | 394 | ||
393 | if (ann->cpu_list) { | 395 | if (ann->cpu_list) { |