Lines Matching refs:head
719 size_t buffer_size, u64 head)
732 * @head is continuously increasing - if its value is equal or greater
735 if (head >= buffer_size)
739 * The value of @head is somewhere within the size of the ring buffer.
741 * buffer yet or the trace time was so long that @head has numerically
748 /* @head is less than 512 byte from the end of the ring buffer */
749 if (head > watermark)
750 watermark = head;
759 * If we find trace data at the end of the ring buffer, @head has
772 u64 *head, u64 *old)
790 * Check to see if *head has wrapped around. If it hasn't only the
791 * amount of data between *head and *old is snapshot'ed to avoid
792 * bloating the perf.data file with zeros. But as soon as *head has
796 if (!wrapped && cs_etm_buffer_has_wrapped(data, mm->len, *head)) {
801 pr_debug3("%s: mmap index %d old head %zu new head %zu size %zu\n",
802 __func__, idx, (size_t)*old, (size_t)*head, mm->len);
804 /* No wrap has occurred, we can just use *head and *old. */
809 * *head has wrapped around - adjust *head and *old to pickup the
812 if (*head >= mm->len) {
813 *old = *head - mm->len;
815 *head += mm->len;
816 *old = *head - mm->len;