summaryrefslogtreecommitdiff
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-12-13 21:31:49 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 15:14:59 +0100
commit688f897ddd96968cf59a2d67afe2a394a0bf8ab3 (patch)
treee303dd2f94a5c670a318008c891674e116558e6b /tools/perf/util/hist.c
parenta898b45a9c18bd9d723f82576a5b32a102808a09 (diff)
parentfb2d2dee504a963efdcb76517b5cdf25444cf535 (diff)
Merge remote-tracking branch 'linux-fslc/4.9-1.0.x-imx' into toradex_4.9-1.0.x-imx-next
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index a69f027368ef..10849a079026 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1,6 +1,7 @@
#include "util.h"
#include "build-id.h"
#include "hist.h"
+#include "map.h"
#include "session.h"
#include "sort.h"
#include "evlist.h"
@@ -1019,6 +1020,10 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
int max_stack_depth, void *arg)
{
int err, err2;
+ struct map *alm = NULL;
+
+ if (al && al->map)
+ alm = map__get(al->map);
err = sample__resolve_callchain(iter->sample, &callchain_cursor, &iter->parent,
iter->evsel, al, max_stack_depth);
@@ -1058,6 +1063,8 @@ out:
if (!err)
err = err2;
+ map__put(alm);
+
return err;
}