/* This will return the event that will be read next, but does not increment the iterator.  */
struct ring_buffer_event* ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
/* This will return the event that will be read next, but does not increment the iterator.  */
struct ring_buffer_event* ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
{
	struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;
	struct ring_buffer_event *event;
	unsigned long flags;
 again:
	spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
	event = rb_iter_peek(iter, ts);
	spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
	if (event && event->type_len == RINGBUF_TYPE_PADDING)
		goto again;
	return event;
}