diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-24 17:33:18 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-06-04 10:28:52 -0300 |
commit | 14c8dde170cc1ba6754a1275ff378092ab36b257 (patch) | |
tree | 085c9ac85dd703b2943bcdea27c1f1509c748f99 /tools/perf/builtin-top.c | |
parent | 0693f7588a2f2e016e0774102c52ab2494938348 (diff) | |
download | op-kernel-dev-14c8dde170cc1ba6754a1275ff378092ab36b257.zip op-kernel-dev-14c8dde170cc1ba6754a1275ff378092ab36b257.tar.gz |
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/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index bc71e89..04fe048 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -123,14 +123,9 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he) } notes = symbol__annotation(sym); - if (notes->src != NULL) { - pthread_mutex_lock(¬es->lock); - goto out_assign; - } - pthread_mutex_lock(¬es->lock); - if (symbol__alloc_hist(sym) < 0) { + if (!symbol__hists(sym, top->evlist->nr_entries)) { pthread_mutex_unlock(¬es->lock); pr_err("Not enough memory for annotating '%s' symbol!\n", sym->name); @@ -140,7 +135,6 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he) err = symbol__annotate(sym, map, evsel, 0, NULL); if (err == 0) { -out_assign: top->sym_filter_entry = he; } else { char msg[BUFSIZ]; |