函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-27 13:00:44
Last Modify:2020-03-17 19:30:04 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:rb_iter_peek

函数原型:static struct ring_buffer_event *rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer_iter *iter
u64 *ts
3955  nr_loops等于0
3957  如果tsts等于0
3960  cpu_buffer等于cpu_buffer
3961  buffer等于buffer
3968  如果此条件成立可能性小(为编译器优化)(cache_read != read || cache_reader_page != reader_page)则rb_iter_reset(iter)
3972  again :
3973  如果g_buffer_iter_empty - check if an iterator has no more to read*@iter: The iterator to check则返回:NULL
3984  如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 3)则返回:NULL
3987  如果rb_per_cpu_empty(cpu_buffer)则返回:NULL
3990  如果head大于等于Size is determined by what has been committed
3991  rb_inc_iter(iter)
3992  转到:again
3995  event等于rb_iter_head_event(iter)
3998  :type_len恒等于RINGBUF_TYPE_PADDING
3999  如果rb_null_event(event)则
4000  rb_inc_iter(iter)
4001  转到:again
4003  rb_advance_iter(iter)
4004  返回:event
4006  :type_len恒等于RINGBUF_TYPE_TIME_EXTEND
4008  rb_advance_iter(iter)
4009  转到:again
4011  :type_len恒等于RINGBUF_TYPE_TIME_STAMP
4012  如果ts
4018  rb_advance_iter(iter)
4019  转到:again
4021  :type_len恒等于define RINGBUF_TYPE_DATA for 'case RINGBUF_TYPE_DATA:'
4022  如果ts且非ts
4023  ts等于read_stamptime_delta
4027  返回:event
4029  默认
4030  BUG()
4033  返回:NULL
调用者
名称描述
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.