函数逻辑报告 |
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 |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称: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 |
| 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 |
| 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则 |
| 3923 | ts等于g_buffer_event_time_stamp - return the event's extended timestamp*@event: the event to get the timestamp of* Returns the extended timestamp associated with a data event |
| 3924 | ring_buffer_normalize_time_stamp(buffer, cpu, ts) |
| 3928 | rb_advance_reader(cpu_buffer) |
| 3929 | 转到:again |
| 3933 | ts等于read_stamp加time_delta |
| 3934 | ring_buffer_normalize_time_stamp(buffer, cpu, ts) |
| 3937 | 如果lost_events则lost_events等于rb_lost_events(cpu_buffer) |
| 3939 | 返回:event |
| 3941 | 默认 |
| 3942 | BUG() |
| 3945 | 返回:NULL |
| 名称 | 描述 |
|---|---|
| ring_buffer_peek | 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 |
| ring_buffer_consume | g_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 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |