函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:g_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

函数原型:struct ring_buffer_event *ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events)

返回类型:struct ring_buffer_event

参数:

类型参数名称
struct ring_buffer *buffer
intcpu
u64 *ts
unsigned long *lost_events
4083  cpu_buffer等于buffers[cpu]
4088  如果非测试CPU信息则返回:NULL
4091  again :
4092  local_irq_save(flags)
4093  dolock等于rb_reader_lock(cpu_buffer)
4094  event等于rb_buffer_peek(cpu_buffer, ts, lost_events)
4095  如果eventtype_len恒等于RINGBUF_TYPE_PADDINGrb_advance_reader(cpu_buffer)
4097  rb_reader_unlock(cpu_buffer, dolock)
4098  local_irq_restore(flags)
4100  如果eventtype_len恒等于RINGBUF_TYPE_PADDING则转到:again
4103  返回:event
调用者
名称描述
peek_next_entry
get_return_for_leaf