Skip to contentSkip to conversation

perf callchain: Reset cursor arg instead of callchain_cursor

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Nov 18, 2017 perf events

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  914eb9ca51117776d83e6761a1c555fb76f0ded2
Gitweb:     https://git.kernel.org/tip/914eb9ca51117776d83e6761a1c555fb76f0ded2
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 6 Aug 2017 16:39:39 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 16 Nov 2017 14:50:08 -0300

perf callchain: Reset cursor arg instead of callchain_cursor

We already pass cursor into thread__resolve_callchain function, so there's no point in resetting the global instance.

---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/machine.c +1 -1
index 270f322..64d255f 100644
@@ -2204,7 +2204,7 @@ int thread__resolve_callchain(struct thread *thread,
 {
 	int ret = 0;
 
-	callchain_cursor_reset(&callchain_cursor);
+	callchain_cursor_reset(cursor);
 
 	if (callchain_param.order == ORDER_CALLEE) {
 		ret = thread__resolve_callchain_sample(thread, cursor,