diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-18 15:37:41 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-19 11:33:51 -0300 |
commit | b66d8c0caa8f7925ae75fed243b0482a901f21e1 (patch) | |
tree | c16e7257c612d54a6ff7af9c29ef627884d984a1 /tools/perf/builtin-top.c | |
parent | bf19b82e7cf033319525a9eab12216b59c41c519 (diff) | |
download | linux-b66d8c0caa8f7925ae75fed243b0482a901f21e1.tar.bz2 |
perf annotate: Auto allocate symbol per addr hist buckets
Instead of open coding it in multiple places in 'report' and 'top'.
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ay1ushp57qsva9aw59rha5ve@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 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 03d37a76c612..73df9c05bad9 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -189,14 +189,6 @@ static void perf_top__record_precise_ip(struct perf_top *top, if (pthread_mutex_trylock(¬es->lock)) return; - if (notes->src == NULL && symbol__alloc_hist(sym) < 0) { - pthread_mutex_unlock(¬es->lock); - pr_err("Not enough memory for annotating '%s' symbol!\n", - sym->name); - sleep(1); - return; - } - ip = he->ms.map->map_ip(he->ms.map, ip); err = symbol__inc_addr_samples(sym, he->ms.map, counter, ip); @@ -204,6 +196,11 @@ static void perf_top__record_precise_ip(struct perf_top *top, if (err == -ERANGE && !he->ms.map->erange_warned) ui__warn_map_erange(he->ms.map, sym, ip); + else if (err == -ENOMEM) { + pr_err("Not enough memory for annotating '%s' symbol!\n", + sym->name); + sleep(1); + } } static void perf_top__show_details(struct perf_top *top) |