summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-05-24 17:33:18 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-06-04 10:28:52 -0300
commit14c8dde170cc1ba6754a1275ff378092ab36b257 (patch)
tree085c9ac85dd703b2943bcdea27c1f1509c748f99 /tools/perf/util/annotate.c
parent0693f7588a2f2e016e0774102c52ab2494938348 (diff)
downloadlinux-14c8dde170cc1ba6754a1275ff378092ab36b257.tar.bz2
perf annotate: Replace symbol__alloc_hists() with symbol__hists()
Its a bit shorter, so ditch the old symbol__alloc_hists() function. 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-m7tienxk7dijh5ln62yln1m9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 7c194b04a2da..bcd5d3e17b85 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -689,7 +689,7 @@ static struct annotated_source *annotated_source__new(void)
return src;
}
-static void annotated_source__delete(struct annotated_source *src)
+static __maybe_unused void annotated_source__delete(struct annotated_source *src)
{
if (src == NULL)
return;
@@ -729,23 +729,6 @@ static int annotated_source__alloc_histograms(struct annotated_source *src,
return src->histograms ? 0 : -1;
}
-int symbol__alloc_hist(struct symbol *sym)
-{
- size_t size = symbol__size(sym);
- struct annotation *notes = symbol__annotation(sym);
-
- notes->src = annotated_source__new();
- if (notes->src == NULL)
- return -1;
-
- if (annotated_source__alloc_histograms(notes->src, size, symbol_conf.nr_events) < 0) {
- annotated_source__delete(notes->src);
- notes->src = NULL;
- return -1;
- }
- return 0;
-}
-
/* The cycles histogram is lazily allocated. */
static int symbol__alloc_hist_cycles(struct symbol *sym)
{
@@ -868,7 +851,7 @@ alloc_cycles_hist:
return notes->src->cycles_hist;
}
-static struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists)
+struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists)
{
struct annotation *notes = symbol__annotation(sym);