函数逻辑报告 |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-27 13:00:52 |
| Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:struct ring_buffer_event *ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events)
返回类型:struct ring_buffer_event
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct ring_buffer * | buffer | |
| int | cpu | |
| u64 * | ts | |
| unsigned long * | lost_events |
| 4148 | struct ring_buffer_event * event = NULL |
| 4152 | again : |
| 4154 | 禁止抢占() |
| 4159 | cpu_buffer等于buffers[cpu] |
| 4160 | local_irq_save(flags) |
| 4161 | dolock等于rb_reader_lock(cpu_buffer) |
| 4163 | event等于rb_buffer_peek(cpu_buffer, ts, lost_events) |
| 4164 | 如果event则 |
| 4165 | lost_events等于0 |
| 4166 | rb_advance_reader(cpu_buffer) |
| 4169 | rb_reader_unlock(cpu_buffer, dolock) |
| 4170 | local_irq_restore(flags) |
| 4172 | out : |
| 4173 | 禁用抢占和中断() |
| 4175 | 如果event且type_len恒等于RINGBUF_TYPE_PADDING则转到:again |
| 4178 | 返回:event |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |