函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate new trace_probe and initialize it (including kprobes).

函数原型:static struct trace_kprobe *alloc_trace_kprobe(const char *group, const char *event, void *addr, const char *symbol, unsigned long offs, int maxactive, int nargs, bool is_return)

返回类型:struct trace_kprobe

参数:

类型参数名称
const char *group
const char *event
void *addr
const char *symbol
unsigned longoffs
intmaxactive
intnargs
boolis_return
265  ret等于负ENOMEM
267  tk等于分配内存并置零
268  如果非tk则返回:错误号
271  nhit等于alloc_percpu(unsignedlong)
272  如果非nhit则转到:error
275  如果symbol
276  symbol name 等于kstrdup(symbol, GFP_KERNEL)
277  如果非symbol name 则转到:error
279  Allow user to indicate symbol name of the probe point 等于symbol name
280  Offset into the symbol 等于offs
281  否则 location of the probe point 等于addr
284  如果is_returnhandler等于kretprobe_dispatcher
286  否则 Called before addr is executed. 等于kprobe_dispatcher
289  maxactive等于maxactive
290  INIT_HLIST_NODE( & hlist)
291  初始化链表头
293  ret等于trace_probe_init( & tp, event, group, false)
294  如果ret小于0则转到:error
297  dyn_event_init( & devent, & trace_kprobe_ops)
298  返回:tk
299  error :
300  free_trace_kprobe(tk)
301  返回:错误号
调用者
名称描述
trace_kprobe_create