函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:allocate_trace_buffer

函数原型:static int allocate_trace_buffer(struct trace_array *tr, struct trace_buffer *buf, int size)

返回类型:int

参数:

类型参数名称
struct trace_array *tr
struct trace_buffer *buf
intsize
8371  rb_flags等于如果trace_flags按位与TRACE_ITER_OVERWRITERB_FL_OVERWRITE否则0
8373  tr等于tr
8375  buffer等于Because the ring buffer is generic, if other users of the ring buffer get* traced by ftrace, it can produce lockdep warnings. We need to keep each* ring buffer's lock class separate.(size, rb_flags)
8376  如果非buffer则返回:负ENOMEM
8379  data等于alloc_percpu(structtrace_array_cpu)
8380  如果非data
8381  g_buffer_free - free a ring buffer.*@buffer: the buffer to free.
8382  buffer = NULL
8383  返回:负ENOMEM
8387  set_buffer_entries( & trace_buffer, g_buffer_size - return the size of the ring buffer (in bytes)*@buffer: The ring buffer.)
8390  返回:0
调用者
名称描述
allocate_trace_buffers