函数逻辑报告 |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-27 13:00:03 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:rb_reserve_next_event
函数原型:static __always_inline struct ring_buffer_event *rb_reserve_next_event(struct ring_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer, unsigned long length)
返回类型:struct ring_buffer_event
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ring_buffer * | buffer | |
struct ring_buffer_per_cpu * | cpu_buffer | |
unsigned long | length |
2877 | nr_loops等于0 |
2880 | rb_start_commit(cpu_buffer) |
2898 | again : |
2899 | add_timestamp等于0 |
2900 | delta等于0 |
2911 | 如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 1000)则转到:out_fail |
2914 | ts等于rb_time_stamp(buffer) |
2915 | diff等于ts减write_stamp |
2920 | 如果ring_buffer_time_stamp_abs(buffer)则 |
2922 | rb_handle_timestamp(cpu_buffer, & info) |
2923 | 否则如果此条件成立可能性大(为编译器优化)(ts >= write_stamp)则 |
2930 | event等于__rb_reserve_next(cpu_buffer, & info) |
2932 | 如果此条件成立可能性小(为编译器优化)(错误 == - EAGAIN)则 |
2933 | 如果add_timestamp则length减等于RB_LEN_TIME_EXTEND |
2935 | 转到:again |
2941 | 返回:event |
2943 | out_fail : |
2944 | rb_end_commit(cpu_buffer) |
2945 | 返回:NULL |
名称 | 描述 |
---|---|
ring_buffer_lock_reserve | g_buffer_lock_reserve - reserve a part of the buffer*@buffer: the ring buffer to reserve from*@length: the length of the data to reserve (excluding event header)* Returns a reserved event on the ring buffer to copy directly to |
ring_buffer_write | g_buffer_write - write data to the buffer without reserving*@buffer: The ring buffer to write to |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |