diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-24 22:28:29 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-06-04 16:28:51 +0300 |
commit | e1a91a834d6e1b6616b76b0ba22e7e11d5592c3b (patch) | |
tree | 1b84ae0bdd6692a78e3637887b2bb53bdadc360c /tools/perf/util/annotate.h | |
parent | be3e26d99c3abf4b17728da7bc606dd05419611e (diff) | |
download | linux-e1a91a834d6e1b6616b76b0ba22e7e11d5592c3b.tar.xz |
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) void annotation__update_column_widths(struct annotation *notes); void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); +static inline struct sym_hist *annotated_source__histogram(struct annotated_source *src, int idx) +{ + return ((void *)src->histograms) + (src->sizeof_sym_hist * idx); +} + static inline struct sym_hist *annotation__histogram(struct annotation *notes, int idx) { - return (((void *)notes->src->histograms) + - (notes->src->sizeof_sym_hist * idx)); + return annotated_source__histogram(notes->src, idx); } static inline struct annotation *symbol__annotation(struct symbol *sym) |