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 <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra
2010-05-28 19:41:35 +02:00
committed by Ingo Molnar
parent ca5135e6b4
commit d57e34fdd6
2 changed files with 36 additions and 27 deletions

View File

@@ -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;