Function report |
Source Code:kernel\trace\trace.c |
Create Date:2022-07-28 11:59:24 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:race_vbprintk - write binary msg to tracing buffer*@ip: The address of the caller*@fmt: The string format to write to the buffer*@args: Arguments for @fmt
Proto:int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned long | ip | |
| const char * | fmt | |
| va_list | args |
| 3191 | call = event_bprint |
| 3194 | tr = The global_trace is the descriptor that holds the top-level tracing* buffers for the live tracing. |
| 3198 | len = 0 |
| 3204 | pause_graph_tracing() |
| 3206 | pc = We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt. |
| 3207 | preempt_disable_notrace() |
| 3209 | tbuffer = Thise allows for lockless recording. If we're nested too deeply, then* this returns NULL. |
| 3210 | If Not tbuffer Then |
| 3211 | len = 0 |
| 3212 | Go to out_nobuffer |
| 3215 | len = vbin_printf((u32 * )tbuffer, TRACE_BUF_SIZE / sizeof(int), fmt, args) |
| 3217 | If len > TRACE_BUF_SIZE / sizeof(int) || len < 0 Then Go to out |
| 3220 | local_save_flags(flags) |
| 3223 | event = __trace_buffer_lock_reserve(buffer, TRACE_BPRINT, size, flags, pc) |
| 3227 | entry = g_buffer_event_data - return the data of the event*@event: the event to get the data from |
| 3232 | If Not call_filter_check_discard(call, entry, buffer, event) Then |
| 3233 | __buffer_unlock_commit(buffer, event) |
| 3234 | ftrace_trace_stack(tr, buffer, flags, 6, pc, NULL) |
| 3237 | out : |
| 3238 | put_trace_buf() |
| 3240 | out_nobuffer : |
| 3241 | preempt_enable_notrace() |
| 3242 | unpause_graph_tracing() |
| 3244 | Return len |
| Name | Describe |
|---|---|
| __trace_bprintk | |
| __ftrace_vbprintk |
| 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 |