perf: Simplify the ring-buffer logic: make perf_buffer_alloc() do everything needed
Commit-ID: d57e34fdd60be7ffd0b1d86bfa1a553df86b7172 Gitweb: http://git.kernel.org/tip/d57e34fdd60be7ffd0b1d86bfa1a553df86b7172 Author: Peter Zijlstra <[email protected]> AuthorDate: Fri, 28 May 2010 19:41:35 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 9 Jun 2010 11:12:35 +0200
perf: Simplify the ring-buffer logic: make perf_buffer_alloc() do everything needed
Currently there are perf_buffer_alloc() + perf_buffer_init() + some separate bits, fold it all into a single perf_buffer_alloc() and only leave the attachment to the event separate.
Signed-off-by Peter Zijlstra <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- include/linux/perf_event.h | 2 + kernel/perf_event.c | 61 ++++++++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 27 deletions(-)
include/linux/perf_event.h +2 -0
@@ -602,6 +602,8 @@ enum perf_event_active_state {struct file ; +#define PERF_BUFFER_WRITABLE 0x01 +struct perf_buffer {atomic_t refcount;struct rcu_head rcu_head;
kernel/perf_event.c +34 -27
123 lines not on this page · raw message