aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/ring_buffer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index c61f0cbd308b..7611d0f66cf8 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -347,6 +347,7 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size,
347 bool truncated) 347 bool truncated)
348{ 348{
349 struct ring_buffer *rb = handle->rb; 349 struct ring_buffer *rb = handle->rb;
350 bool wakeup = truncated;
350 unsigned long aux_head; 351 unsigned long aux_head;
351 u64 flags = 0; 352 u64 flags = 0;
352 353
@@ -375,9 +376,16 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size,
375 aux_head = rb->user_page->aux_head = local_read(&rb->aux_head); 376 aux_head = rb->user_page->aux_head = local_read(&rb->aux_head);
376 377
377 if (aux_head - local_read(&rb->aux_wakeup) >= rb->aux_watermark) { 378 if (aux_head - local_read(&rb->aux_wakeup) >= rb->aux_watermark) {
378 perf_output_wakeup(handle); 379 wakeup = true;
379 local_add(rb->aux_watermark, &rb->aux_wakeup); 380 local_add(rb->aux_watermark, &rb->aux_wakeup);
380 } 381 }
382
383 if (wakeup) {
384 if (truncated)
385 handle->event->pending_disable = 1;
386 perf_output_wakeup(handle);
387 }
388
381 handle->event = NULL; 389 handle->event = NULL;
382 390
383 local_set(&rb->aux_nest, 0); 391 local_set(&rb->aux_nest, 0);