aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-04-13 09:47:04 +0200
committerIngo Molnar <mingo@kernel.org>2012-04-13 09:47:04 +0200
commita7ca08038b990e2cbed324948664b2d8940fd782 (patch)
treec92e113441f9556e08fe7d10bdd40392b7bdef07 /tools/perf/util/hist.c
parent4166fb64593514ad920b7dbd290e0a934b37d24a (diff)
parent7fb0a5ee8889488f7568ffddffeb66ddeb50917e (diff)
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull various perf tooling fixes from Arnaldo Carvalho de Melo.
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 2ec4b60aff6..9f6d630d531 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -256,6 +256,18 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
if (!cmp) {
he->period += period;
++he->nr_events;
+
+ /* If the map of an existing hist_entry has
+ * become out-of-date due to an exec() or
+ * similar, update it. Otherwise we will
+ * mis-adjust symbol addresses when computing
+ * the history counter to increment.
+ */
+ if (he->ms.map != entry->ms.map) {
+ he->ms.map = entry->ms.map;
+ if (he->ms.map)
+ he->ms.map->referenced = true;
+ }
goto out;
}