Lines Matching refs:head
53 unsigned long head; in perf_output_put_handle() local
76 head = local_read(&rb->head); in perf_output_put_handle()
110 WRITE_ONCE(rb->user_page->data_head, head); in perf_output_put_handle()
125 if (unlikely(head != local_read(&rb->head))) { in perf_output_put_handle()
138 ring_buffer_has_space(unsigned long head, unsigned long tail, in ring_buffer_has_space() argument
143 return CIRC_SPACE(head, tail, data_size) >= size; in ring_buffer_has_space()
145 return CIRC_SPACE(tail, head, data_size) >= size; in ring_buffer_has_space()
154 unsigned long tail, offset, head; in __perf_output_begin() local
193 offset = head = local_read(&rb->head); in __perf_output_begin()
195 if (unlikely(!ring_buffer_has_space(head, tail, in __perf_output_begin()
214 head += size; in __perf_output_begin()
216 head -= size; in __perf_output_begin()
217 } while (local_cmpxchg(&rb->head, offset, head) != offset); in __perf_output_begin()
220 offset = head; in __perf_output_begin()
221 head = (u64)(-head); in __perf_output_begin()
229 if (unlikely(head - local_read(&rb->wakeup) > rb->watermark)) in __perf_output_begin()
410 handle->head = aux_head; in perf_aux_output_begin()
485 aux_head = handle->head; in perf_aux_output_end()
548 handle->head = rb->aux_head; in perf_aux_output_skip()