函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer_benchmark.c Create Date:2022-07-27 13:01:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:read_page

函数原型:static enum event_status read_page(int cpu)

返回类型:enum event_status

参数:

类型参数名称
intcpu
116  bpage等于g_buffer_alloc_read_page - allocate a page to read from buffer*@buffer: the buffer to allocate for
117  如果是错误则返回:EVENT_DROPPED
120  ret等于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
121  如果ret大于等于0则
122  rpage等于bpage
124  commit等于local_read( & commit)按位与0xfffff
125 i小于commit且非test_error循环
127  如果i大于等于PAGE_SIZEoffsetof(structrb_page, data)则
128  TEST_ERROR()
129  退出
132  inc等于负1
133  event = (void * ) & data[i]
137  如果非time_deltaTEST_ERROR()
139  inc等于array[0]加4
140  退出
142  inc等于8
143  退出
144  :type_len恒等于0
146  如果entry不等于cpu
147  TEST_ERROR()
148  退出
150  read自加
151  如果非array[0]则
152  TEST_ERROR()
153  退出
155  inc等于array[0]加4
156  退出
157  默认
159  如果entry不等于cpu
160  TEST_ERROR()
161  退出
163  read自加
164  inc等于type_len加1的和乘4
166  如果test_error退出
169  如果inc小于等于0则
170  TEST_ERROR()
171  退出
175  g_buffer_free_read_page - free an allocated read page*@buffer: the buffer the page was allocate for*@cpu: the cpu buffer the page came from*@data: the page to free* Free a page allocated from ring_buffer_alloc_read_page.
177  如果ret小于0则返回:EVENT_DROPPED
179  返回:EVENT_FOUND
调用者
名称描述
ring_buffer_consumer