summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2013-10-31 13:58:30 +0900
committerJiri Olsa <jolsa@kernel.org>2014-06-01 14:34:58 +0200
commitc7405d85d7a354b8ba49e2db7c4b027e6cb997c1 (patch)
tree0af81be04a236fa72d5b3c3233875e707a04921e /tools/perf/util/hist.c
parent7a13aa28aa268359cee006059731f49bcd1f839e (diff)
downloadop-kernel-dev-c7405d85d7a354b8ba49e2db7c4b027e6cb997c1.zip
op-kernel-dev-c7405d85d7a354b8ba49e2db7c4b027e6cb997c1.tar.gz
perf tools: Update cpumode for each cumulative entry
The cpumode and level in struct addr_localtion was set for a sample and but updated as cumulative callchains were added. This led to have non-matching symbol and cpumode in the output. Update it accordingly based on the fact whether the map is a part of the kernel or not. This is a reverse of what thread__find_addr_map() does. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arun Sharma <asharma@fb.com> Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1401335910-16832-7-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 6079b5a..37c28fc 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -743,18 +743,9 @@ iter_next_cumulative_entry(struct hist_entry_iter *iter,
if (node == NULL)
return 0;
- al->map = node->map;
- al->sym = node->sym;
- if (node->map)
- al->addr = node->map->map_ip(node->map, node->ip);
- else
- al->addr = node->ip;
-
- if (iter->hide_unresolved && al->sym == NULL)
- return 0;
-
callchain_cursor_advance(&callchain_cursor);
- return 1;
+
+ return fill_callchain_info(al, node, iter->hide_unresolved);
}
static int
OpenPOWER on IntegriCloud