Lines Matching refs:head
57 unsigned long head; in perf_output_put_handle() local
80 head = local_read(&rb->head); in perf_output_put_handle()
114 WRITE_ONCE(rb->user_page->data_head, head); in perf_output_put_handle()
129 if (unlikely(head != local_read(&rb->head))) { in perf_output_put_handle()
142 ring_buffer_has_space(unsigned long head, unsigned long tail, in ring_buffer_has_space() argument
147 return CIRC_SPACE(head, tail, data_size) >= size; in ring_buffer_has_space()
149 return CIRC_SPACE(tail, head, data_size) >= size; in ring_buffer_has_space()
159 unsigned long tail, offset, head; in __perf_output_begin() local
199 offset = local_read(&rb->head); in __perf_output_begin()
201 head = offset; in __perf_output_begin()
204 if (unlikely(!ring_buffer_has_space(head, tail, in __perf_output_begin()
223 head += size; in __perf_output_begin()
225 head -= size; in __perf_output_begin()
226 } while (!local_try_cmpxchg(&rb->head, &offset, head)); in __perf_output_begin()
229 offset = head; in __perf_output_begin()
230 head = (u64)(-head); in __perf_output_begin()
238 if (unlikely(head - local_read(&rb->wakeup) > rb->watermark)) in __perf_output_begin()
423 handle->head = aux_head; in perf_aux_output_begin()
498 aux_head = handle->head; in perf_aux_output_end()
561 handle->head = rb->aux_head; in perf_aux_output_skip()