aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-07-01 10:20:36 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-18 19:32:31 -0400
commit927c7a9e92c4f69097a6e9e086d11fc2f8a5b40b (patch)
treed98bde726caf6b27d465852b5683cf08485df007 /include/linux/perf_event.h
parentf72c1a931e311bb7780fee19e41a89ac42cab50e (diff)
perf: Fix race in callchains
Now that software events don't have interrupt disabled anymore in the event path, callchains can nest on any context. So seperating nmi and others contexts in two buffers has become racy. Fix this by providing one buffer per nesting level. Given the size of the callchain entries (2040 bytes * 4), we now need to allocate them dynamically. v2: Fixed put_callchain_entry call after recursion. Fix the type of the recursion, it must be an array. v3: Use a manual pr cpu allocation (temporary solution until NMIs can safely access vmalloc'ed memory). Do a better separation between callchain reference tracking and allocation. Make the "put" path lockless for non-release cases. v4: Protect the callchain buffers with rcu. v5: Do the cpu buffers allocations node affine. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Tested-by: Will Deacon <will.deacon@arm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: David Miller <davem@davemloft.net> Cc: Borislav Petkov <bp@amd64.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 4db61dded388..d7e8ea690864 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -983,7 +983,6 @@ extern void perf_callchain_user(struct perf_callchain_entry *entry,
983 struct pt_regs *regs); 983 struct pt_regs *regs);
984extern void perf_callchain_kernel(struct perf_callchain_entry *entry, 984extern void perf_callchain_kernel(struct perf_callchain_entry *entry,
985 struct pt_regs *regs); 985 struct pt_regs *regs);
986extern struct perf_callchain_entry *perf_callchain_buffer(void);
987 986
988 987
989static inline void 988static inline void