函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)

返回类型:int

参数:

类型参数名称
unsigned longip
const char *fmt
va_listargs
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
3200  如果此条件成立可能性小(为编译器优化)(We need to change this state when a selftest is running.* A selftest will lurk into the ring-buffer to count the* entries inserted during the selftest although some concurrent* insertions into the ring-buffer such as trace_printk could occurred || Kill all tracing for good (never come back).* It is initialized to 1 but will turn to zero if the initialization* of the tracer is successful. But that is the only place that sets* this back to zero.)则返回:0
3204  pause_graph_tracing()
3206  pc等于抢占计数值
3207  preempt_disable_notrace()
3209  tbuffer等于Thise allows for lockless recording. If we're nested too deeply, then* this returns NULL.
3210  如果非tbuffer
3211  len等于0
3212  转到:out_nobuffer
3215  len等于vbin_printf((u32 * )tbuffer, TRACE_BUF_SIZE / sizeof(int), fmt, args)
3217  如果len大于TRACE_BUF_SIZEsizeof(int)或len小于0则转到:out
3220  local_save_flags(flags)
3221  size等于entry的长度加sizeof(u32)乘len
3222  buffer等于buffer
3223  event等于__trace_buffer_lock_reserve(buffer, TRACE_BPRINT, size, flags, pc)
3225  如果非event则转到:out
3227  entry等于g_buffer_event_data - return the data of the event*@event: the event to get the data from
3228  ip等于ip
3229  fmt等于fmt
3231  内存复制(buf, tbuffer, sizeof(u32) * len)
3232  如果非call_filter_check_discard(call, entry, buffer, event)则
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  返回:len
调用者
名称描述
__trace_bprintk
__ftrace_vbprintk