aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/callchain.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-05-31 14:43:26 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-31 10:47:12 -0300
commit472606458f3e1ced5fe3cc5f04e90a6b5a4732cf (patch)
treea4110008697cc1e80d0c2a47cf9871e3cf32b299 /tools/perf/util/callchain.c
parentperf tools: Fix pager on minimal-install embedded systems (diff)
downloadlinux-dev-472606458f3e1ced5fe3cc5f04e90a6b5a4732cf.tar.xz
linux-dev-472606458f3e1ced5fe3cc5f04e90a6b5a4732cf.zip
perf callchain: Make callchain cursors TLS
perf top -G has a race on callchain cursor between main thread and display thread. Since the callchain cursors are used locally make them thread-local data would solve the problem. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Reported-by: Sunjin Yang <fan4326@gmail.com> Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sunjin Yang <fan4326@gmail.com> Link: http://lkml.kernel.org/r/1338443007-24857-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/callchain.c')
-rw-r--r--tools/perf/util/callchain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 9f7106a8d9a4..3a6bff47614f 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -18,6 +18,8 @@
#include "util.h"
#include "callchain.h"
+__thread struct callchain_cursor callchain_cursor;
+
bool ip_callchain__valid(struct ip_callchain *chain,
const union perf_event *event)
{