函数逻辑报告 |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-27 12:59:22 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:g_buffer_resize - resize the ring buffer*@buffer: the buffer to resize.*@size: the new size.*@cpu_id: the cpu buffer to resize* Minimum size is 2 * BUF_PAGE_SIZE.* Returns 0 on success and < 0 on failure.
函数原型:int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, int cpu_id)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ring_buffer * | buffer | |
unsigned long | size | |
int | cpu_id |
1720 | err等于0 |
1729 | 如果cpu_id不等于RING_BUFFER_ALL_CPUS且非测试CPU信息则返回:size |
1733 | nr_pages等于DIV_ROUND_UP(size, BUF_PAGE_SIZE) |
1739 | size等于nr_pages乘BUF_PAGE_SIZE |
1746 | 如果atomic_read( & resize_disabled)则返回:负EBUSY |
1750 | mutex_lock( & mutex) |
1752 | 如果cpu_id恒等于RING_BUFFER_ALL_CPUS则 |
1754 | for_each_buffer_cpu(buffer, cpu) |
1755 | cpu_buffer等于buffers[cpu] |
1762 | 如果g buffer pages to update, > 0 to add, < 0 to remove 小于等于0则继续下一循环 |
1768 | 初始化链表头 |
1777 | get_online_cpus() |
1783 | for_each_buffer_cpu(buffer, cpu) |
1784 | cpu_buffer等于buffers[cpu] |
1785 | 如果非g buffer pages to update, > 0 to add, < 0 to remove 则继续下一循环 |
1789 | 如果非cpu_online(cpu)则 |
1792 | 否则 |
1793 | 为cpu配置任务 |
1799 | for_each_buffer_cpu(buffer, cpu) |
1800 | cpu_buffer等于buffers[cpu] |
1801 | 如果非g buffer pages to update, > 0 to add, < 0 to remove 则继续下一循环 |
1809 | put_online_cpus() |
1810 | 否则 |
1815 | cpu_buffer等于buffers[cpu_id] |
1823 | 初始化链表头 |
1831 | get_online_cpus() |
1834 | 如果非cpu_online(cpu_id)则rb_update_pages(cpu_buffer) |
1836 | 否则 |
1837 | 为cpu配置任务 |
1843 | put_online_cpus() |
1846 | out : |
1854 | 如果atomic_read( & record_disabled)则 |
1855 | atomic_inc( & record_disabled) |
1863 | for_each_buffer_cpu(buffer, cpu) |
1864 | cpu_buffer等于buffers[cpu] |
1867 | atomic_dec( & record_disabled) |
1871 | 返回:size |
1873 | out_err : |
1874 | for_each_buffer_cpu(buffer, cpu) |
1890 | 返回:err |
名称 | 描述 |
---|---|
__tracing_resize_ring_buffer |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |