函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:traceprobe_parse_probe_arg

函数原型:int traceprobe_parse_probe_arg(struct trace_probe *tp, int i, char *arg, unsigned int flags)

返回类型:int

参数:

类型参数名称
struct trace_probe *tp
inti
char *arg
unsigned intflags
751  parg等于args[i]
755  nr_args自加
757  body等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
758  如果body
759  如果bodyarg大于MAX_ARG_NAME_LEN
761  返回:负EINVAL
762  否则如果body恒等于arg
764  返回:负EINVAL
766  Name of this argument 等于kmemdup_nul(arg, body - arg, GFP_KERNEL)
767  body自加
768  否则
770  Name of this argument 等于kasprintf(GFP_KERNEL, "arg%d", i + 1)
771  body等于arg
773  如果非 Name of this argument 则返回:负ENOMEM
776  如果非Check the name is good for event/group/fields
777  trace_probe_log_err(0, BAD_ARG_NAME)
778  返回:负EINVAL
780  如果Return 1 if name is reserved or already used by another argument
781  trace_probe_log_err(0, USED_ARG_NAME)
782  返回:负EINVAL
785  返回:String length checking wrapper
调用者
名称描述
trace_uprobe_create
trace_kprobe_create