perf: Update perf_event_type documentation
Due to a discussion with Adrian I had a good look at the perf_event_type record layout and found the documentation to be somewhat unclear. Cc: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20130716150907.GL23818@dyad.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
17f41571bb
commit
a5cdd40c98
+16
-15
@@ -4462,20 +4462,6 @@ void perf_output_sample(struct perf_output_handle *handle,
|
||||
}
|
||||
}
|
||||
|
||||
if (!event->attr.watermark) {
|
||||
int wakeup_events = event->attr.wakeup_events;
|
||||
|
||||
if (wakeup_events) {
|
||||
struct ring_buffer *rb = handle->rb;
|
||||
int events = local_inc_return(&rb->events);
|
||||
|
||||
if (events >= wakeup_events) {
|
||||
local_sub(wakeup_events, &rb->events);
|
||||
local_inc(&rb->wakeup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sample_type & PERF_SAMPLE_BRANCH_STACK) {
|
||||
if (data->br_stack) {
|
||||
size_t size;
|
||||
@@ -4511,16 +4497,31 @@ void perf_output_sample(struct perf_output_handle *handle,
|
||||
}
|
||||
}
|
||||
|
||||
if (sample_type & PERF_SAMPLE_STACK_USER)
|
||||
if (sample_type & PERF_SAMPLE_STACK_USER) {
|
||||
perf_output_sample_ustack(handle,
|
||||
data->stack_user_size,
|
||||
data->regs_user.regs);
|
||||
}
|
||||
|
||||
if (sample_type & PERF_SAMPLE_WEIGHT)
|
||||
perf_output_put(handle, data->weight);
|
||||
|
||||
if (sample_type & PERF_SAMPLE_DATA_SRC)
|
||||
perf_output_put(handle, data->data_src.val);
|
||||
|
||||
if (!event->attr.watermark) {
|
||||
int wakeup_events = event->attr.wakeup_events;
|
||||
|
||||
if (wakeup_events) {
|
||||
struct ring_buffer *rb = handle->rb;
|
||||
int events = local_inc_return(&rb->events);
|
||||
|
||||
if (events >= wakeup_events) {
|
||||
local_sub(wakeup_events, &rb->events);
|
||||
local_inc(&rb->wakeup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void perf_prepare_sample(struct perf_event_header *header,
|
||||
|
||||
Reference in New Issue
Block a user