diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-24 15:28:29 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-06-04 09:28:51 -0400 |
commit | e1a91a834d6e1b6616b76b0ba22e7e11d5592c3b (patch) | |
tree | 1b84ae0bdd6692a78e3637887b2bb53bdadc360c /tools/perf/util/annotate.h | |
parent | be3e26d99c3abf4b17728da7bc606dd05419611e (diff) |
perf annotate: __symbol__inc_addr_samples() needs just annotated_source
It only operates on the histograms, so no need for the encompassing
'struct annotation'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-2se2v7rrjil0kwqywks04ey2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r-- | tools/perf/util/annotate.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 94b60e34c3a7..2a73f9084930 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h | |||
@@ -267,10 +267,14 @@ void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) | |||
267 | void annotation__update_column_widths(struct annotation *notes); | 267 | void annotation__update_column_widths(struct annotation *notes); |
268 | void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); | 268 | void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); |
269 | 269 | ||
270 | static inline struct sym_hist *annotated_source__histogram(struct annotated_source *src, int idx) | ||
271 | { | ||
272 | return ((void *)src->histograms) + (src->sizeof_sym_hist * idx); | ||
273 | } | ||
274 | |||
270 | static inline struct sym_hist *annotation__histogram(struct annotation *notes, int idx) | 275 | static inline struct sym_hist *annotation__histogram(struct annotation *notes, int idx) |
271 | { | 276 | { |
272 | return (((void *)notes->src->histograms) + | 277 | return annotated_source__histogram(notes->src, idx); |
273 | (notes->src->sizeof_sym_hist * idx)); | ||
274 | } | 278 | } |
275 | 279 | ||
276 | static inline struct annotation *symbol__annotation(struct symbol *sym) | 280 | static inline struct annotation *symbol__annotation(struct symbol *sym) |