Function report |
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 activity | Download SCCT | Chinese |
Name:read_page
Proto:static enum event_status read_page(int cpu)
Type:enum event_status
Parameter:
| Type | Parameter | Name |
|---|---|---|
| int | cpu |
| 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 |
| 121 | If ret >= 0 Then |
| 124 | commit = local_read( & commit) & 0xfffff |
| 125 | When i < commit && Not test_error cycle |
| 128 | TEST_ERROR() |
| 129 | Break |
| 132 | inc = -1 |
| 135 | Case type_len == RINGBUF_TYPE_PADDING |
| 141 | Case type_len == RINGBUF_TYPE_TIME_EXTEND |
| 142 | inc = 8 |
| 143 | Break |
| 144 | Case type_len == 0 |
| 145 | entry = g_buffer_event_data - return the data of the event*@event: the event to get the data from |
| 147 | TEST_ERROR() |
| 148 | Break |
| 150 | read++ |
| 151 | If Not array[0] Then |
| 152 | TEST_ERROR() |
| 153 | Break |
| 156 | Break |
| 157 | Default |
| 158 | entry = g_buffer_event_data - return the data of the event*@event: the event to get the data from |
| 160 | TEST_ERROR() |
| 161 | Break |
| 163 | read++ |
| 166 | If test_error Then Break |
| 169 | If inc <= 0 Then |
| 170 | TEST_ERROR() |
| 171 | Break |
| 177 | If ret < 0 Then Return EVENT_DROPPED |
| 179 | Return EVENT_FOUND |
| Name | Describe |
|---|---|
| ring_buffer_consumer |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |