Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_probe.c Create Date:2022-07-28 12:43:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:traceprobe_parse_probe_arg

Proto:int traceprobe_parse_probe_arg(struct trace_probe *tp, int i, char *arg, unsigned int flags)

Type:int

Parameter:

TypeParameterName
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  If body Then
759  If body - arg > MAX_ARG_NAME_LEN Then
761  Return -EINVAL
762  Else if body == arg Then
764  Return -EINVAL
766  Name of this argument = kmemdup_nul(arg, body - arg, GFP_KERNEL)
767  body++
768  Else
770  Name of this argument = kasprintf(GFP_KERNEL, "arg%d", i + 1)
771  body = arg
773  If Not Name of this argument Then Return -ENOMEM
776  If Not Check the name is good for event/group/fields Then
777  trace_probe_log_err(0, BAD_ARG_NAME)
778  Return -EINVAL
780  If Return 1 if name is reserved or already used by another argument Then
781  trace_probe_log_err(0, USED_ARG_NAME)
782  Return -EINVAL
785  Return String length checking wrapper
Caller
NameDescribe
trace_uprobe_create
trace_kprobe_create