Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer_benchmark.c Create Date:2022-07-28 11:56:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:read_page

Proto:static enum event_status read_page(int cpu)

Type:enum event_status

Parameter:

TypeParameterName
intcpu
116  bpage = g_buffer_alloc_read_page - allocate a page to read from buffer*@buffer: the buffer to allocate for
117  If IS_ERR(bpage) Then Return 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  If ret >= 0 Then
122  rpage = bpage
124  commit = local_read( & commit) & 0xfffff
125  When i < commit && Not test_error cycle
127  If i >= PAGE_SIZE - offsetof(structrb_page, data) Then
128  TEST_ERROR()
129  Break
132  inc = -1
133  event = (void * ) & data[i]
137  If Not time_delta Then TEST_ERROR()
139  inc = array[0] + 4
140  Break
142  inc = 8
143  Break
144  Case type_len == 0
146  If entry != cpu Then
147  TEST_ERROR()
148  Break
150  read++
151  If Not array[0] Then
152  TEST_ERROR()
153  Break
155  inc = array[0] + 4
156  Break
157  Default
166  If test_error Then Break
169  If inc <= 0 Then
170  TEST_ERROR()
171  Break
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  If ret < 0 Then Return EVENT_DROPPED
179  Return EVENT_FOUND
Caller
NameDescribe
ring_buffer_consumer