函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rb_buffer_peek

函数原型:static struct ring_buffer_event *rb_buffer_peek(struct ring_buffer_per_cpu *cpu_buffer, u64 *ts, unsigned long *lost_events)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer_per_cpu *cpu_buffer
u64 *ts
unsigned long *lost_events
3882  nr_loops等于0
3884  如果tsts等于0
3886  again :
3893  如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 2)则返回:NULL
3896  reader等于rb_get_reader_page(cpu_buffer)
3897  如果非reader则返回:NULL
3900  event等于rb_reader_event(cpu_buffer)
3903  :type_len恒等于RINGBUF_TYPE_PADDING
3904  如果rb_null_event(event)则uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, 1)
3914  返回:event
3916  :type_len恒等于RINGBUF_TYPE_TIME_EXTEND
3918  rb_advance_reader(cpu_buffer)
3919  转到:again
3921  :type_len恒等于RINGBUF_TYPE_TIME_STAMP
3922  如果ts
3928  rb_advance_reader(cpu_buffer)
3929  转到:again
3931  :type_len恒等于define RINGBUF_TYPE_DATA for 'case RINGBUF_TYPE_DATA:'
3932  如果ts且非ts
3933  ts等于read_stamptime_delta
3937  如果lost_eventslost_events等于rb_lost_events(cpu_buffer)
3939  返回:event
3941  默认
3942  BUG()
3945  返回:NULL
调用者
名称描述
ring_buffer_peekg_buffer_peek - peek at the next event to be read*@buffer: The ring buffer to read*@cpu: The cpu to peak at*@ts: The timestamp counter of this event
ring_buffer_consumeg_buffer_consume - return an event and consume it*@buffer: The ring buffer to get the next event from*@cpu: the cpu to read the buffer from*@ts: a variable to store the timestamp (may be NULL)*@lost_events: a variable to store if events were lost (may be