函数逻辑报告 |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-27 13:00:34 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:rb_get_reader_page
函数原型:static struct buffer_page *rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
返回类型:struct buffer_page
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ring_buffer_per_cpu * | cpu_buffer |
3674 | struct buffer_page * reader = NULL |
3677 | nr_loops等于0 |
3680 | local_irq_save(flags) |
3681 | r sched/core.c and kernel_lock.c: ( & lock) |
3683 | again : |
3690 | 如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 3)则 |
3695 | reader等于reader_page |
3702 | 如果uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, dex for next read > Size is determined by what has been committed )则转到:out |
3707 | reader = NULL |
3708 | 如果committed pages 恒等于reader_page则转到:out |
3718 | local_set( & dex for next write , 0) |
3719 | local_set( & ries on this page , 0) |
3720 | local_set( & write committed index , 0) |
3721 | al end of data 等于0 |
3723 | spin : |
3727 | reader等于rb_set_head_page(cpu_buffer) |
3752 | smp_mb() |
3753 | overwrite等于local_read( & (overrun)) |
3766 | ret等于rb_head_page_replace(reader, reader_page) |
3779 | 链表前项等于list of buffer pages |
3780 | rb_inc_page(cpu_buffer, & ad from head ) |
3782 | local_inc( & pages_read) |
3785 | reader_page等于reader |
3786 | dex for next read 等于0 |
3788 | 如果overwrite不等于last_overrun则 |
3789 | lost_events等于overwrite减last_overrun |
3790 | last_overrun等于overwrite |
3793 | 转到:again |
3795 | out : |
3797 | 如果reader且dex for next read 恒等于0则read_stamp等于 page time stamp |
3800 | arch_spin_unlock( & lock) |
3801 | local_irq_restore(flags) |
3803 | 返回:reader |
名称 | 描述 |
---|---|
rb_advance_reader | |
rb_buffer_peek | |
ring_buffer_read_page | g_buffer_read_page - extract a page from the ring buffer*@buffer: buffer to extract from*@data_page: the page to use allocated from ring_buffer_alloc_read_page*@len: amount to extract*@cpu: the cpu of the buffer to extract |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |