summaryrefslogtreecommitdiff
path: root/tools/perf/util/callchain.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-11 10:20:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-11 10:20:06 -0800
commitd5b76bef01047843cc65bd018046c76182b1fc81 (patch)
tree13aa1b0019d2afeb53257edde54e36c3fa86ecdf /tools/perf/util/callchain.h
parent4e4f74a7eebbc52eaa1dc3c0be6b3c68c0875b09 (diff)
parent451d24d1e5f40bad000fa9abe36ddb16fc9928cb (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "A kernel crash fix plus three tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix crash in perf_event_read() perf callchain: Reference count maps perf diff: Fix -o/--order option behavior (again) perf diff: Fix segfault on 'perf diff -o N' option
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r--tools/perf/util/callchain.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 35c8e379530f..4f4b60f1558a 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -5,6 +5,7 @@
#include <linux/list.h>
#include <linux/rbtree.h>
#include "event.h"
+#include "map.h"
#include "symbol.h"
#define HELP_PAD "\t\t\t\t"
@@ -184,8 +185,13 @@ int callchain_merge(struct callchain_cursor *cursor,
*/
static inline void callchain_cursor_reset(struct callchain_cursor *cursor)
{
+ struct callchain_cursor_node *node;
+
cursor->nr = 0;
cursor->last = &cursor->first;
+
+ for (node = cursor->first; node != NULL; node = node->next)
+ map__zput(node->map);
}
int callchain_cursor_append(struct callchain_cursor *cursor, u64 ip,