| Function report | 
| Source Code: kernel\trace\ring_buffer.c | Create Date:2022-07-28 11:54:38 | 
| Last Modify:2020-03-17 19:30:04 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:g_buffer_lock_reserve - reserve a part of the buffer*@buffer: the ring buffer to reserve from*@length: the length of the data to reserve (excluding event header)* Returns a reserved event on the ring buffer to copy directly to
Proto:struct ring_buffer_event *ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)
Type:struct ring_buffer_event
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct ring_buffer * | buffer | |
| unsigned long | length | 
| 2971 | preempt_disable_notrace() | 
| 2973 | If Value for the false possibility is greater at compile time(atomic_read( & record_disabled)) Then Go to out | 
| 2981 | cpu_buffer = buffers[cpu] | 
| 2983 | If Value for the false possibility is greater at compile time(atomic_read( & record_disabled)) Then Go to out | 
| 2986 | If Value for the false possibility is greater at compile time(length > Max payload is BUF_PAGE_SIZE - header (8bytes) ) Then Go to out | 
| 2989 | If Value for the false possibility is greater at compile time(The lock and unlock are done within a preempt disable section) Then Go to out | 
| 2992 | event = rb_reserve_next_event(buffer, cpu_buffer, length) | 
| 2993 | If Not event Then Go to out_unlock | 
| 2996 | Return event | 
| 2998 | out_unlock : | 
| 3000 | out : | 
| 3001 | preempt_enable_notrace() | 
| 3002 | Return NULL | 
| Name | Describe | 
|---|---|
| ring_buffer_producer | |
| __trace_buffer_lock_reserve | 
| 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 |