Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-28 11:55:15
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rb_iter_peek

Proto:static struct ring_buffer_event *rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)

Type:struct ring_buffer_event

Parameter:

TypeParameterName
struct ring_buffer_iter *iter
u64 *ts
3955  nr_loops = 0
3957  If ts Then ts = 0
3960  cpu_buffer = cpu_buffer
3961  buffer = buffer
3968  If Value for the false possibility is greater at compile time(cache_read != read || cache_reader_page != reader_page) Then rb_iter_reset(iter)
3972  again :
3973  If g_buffer_iter_empty - check if an iterator has no more to read*@iter: The iterator to check Then Return NULL
3984  If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 3) Then Return NULL
3987  If rb_per_cpu_empty(cpu_buffer) Then Return NULL
3990  If head >= Size is determined by what has been committed Then
3991  rb_inc_iter(iter)
3992  Go to again
3995  event = rb_iter_head_event(iter)
3998  Case type_len == RINGBUF_TYPE_PADDING
3999  If rb_null_event(event) Then
4000  rb_inc_iter(iter)
4001  Go to again
4003  rb_advance_iter(iter)
4004  Return event
4006  Case type_len == RINGBUF_TYPE_TIME_EXTEND
4008  rb_advance_iter(iter)
4009  Go to again
4011  Case type_len == RINGBUF_TYPE_TIME_STAMP
4012  If ts Then
4018  rb_advance_iter(iter)
4019  Go to again
4021  Case type_len == define RINGBUF_TYPE_DATA for 'case RINGBUF_TYPE_DATA:'
4022  If ts && Not ts Then
4023  ts = read_stamp + time_delta
4027  Return event
4029  Default
4030  BUG()
4033  Return NULL
Caller
NameDescribe
ring_buffer_iter_peekg_buffer_iter_peek - peek at the next event to be read*@iter: The ring buffer iterator*@ts: The timestamp counter of this event.* This will return the event that will be read next, but does* not increment the iterator.
ring_buffer_readg_buffer_read - read the next item in the ring buffer by the iterator*@iter: The ring buffer iterator*@ts: The time stamp of the event read.* This reads the next event in the ring buffer and increments the iterator.