Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:@buf must has MAX_EVENT_NAME_LEN size

Proto:int traceprobe_parse_event_name(const char **pevent, const char **pgroup, char *buf, int offset)

Type:int

Parameter:

TypeParameterName
const char **pevent
const char **pgroup
char *buf
intoffset
232  event = pevent
235  slash = 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
236  If slash Then
237  If slash == event Then
239  Return -EINVAL
241  If slash - event + 1 > MAX_EVENT_NAME_LEN Then
243  Return -EINVAL
245  Copy a NUL terminated string into a sized buffer
248  Return -EINVAL
250  pgroup = buf
251  pevent = slash + 1
252  offset += slash - event + 1
253  event = pevent
255  len = strlen - Find the length of a string*@s: The string to be sized
256  If len == 0 Then
257  trace_probe_log_err(offset, NO_EVENT_NAME)
258  Return -EINVAL
259  Else if len > MAX_EVENT_NAME_LEN Then
260  trace_probe_log_err(offset, EVENT_TOO_LONG)
261  Return -EINVAL
263  If Not Check the name is good for event/group/fields Then
264  trace_probe_log_err(offset, BAD_EVENT_NAME)
265  Return -EINVAL
267  Return 0
Caller
NameDescribe
trace_uprobe_create
trace_kprobe_create