Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:onmatch_parse

Proto:static struct action_data *onmatch_parse(struct trace_array *tr, char *str)

Type:struct action_data

Parameter:

TypeParameterName
struct trace_array *tr
char *str
4420  ret = -EINVAL
4422  data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
4423  If Not data Then Return ERR_PTR( - ENOMEM)
4426  match_event = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function
4427  If Not match_event || Not str Then
4428  hist_err(tr, HIST_ERR_NO_CLOSING_PAREN, errpos(match_event))
4429  Go to free
4432  match_event_system = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function
4433  If Not match_event Then
4434  hist_err(tr, HIST_ERR_SUBSYS_NOT_FOUND, errpos(match_event_system))
4435  Go to free
4438  If IS_ERR(event_file(tr, match_event_system, match_event)) Then
4439  hist_err(tr, HIST_ERR_INVALID_SUBSYS_EVENT, errpos(match_event))
4440  Go to free
4443  event = kstrdup(match_event, GFP_KERNEL)
4444  If Not event Then
4445  ret = -ENOMEM
4446  Go to free
4449  event_system = kstrdup(match_event_system, GFP_KERNEL)
4450  If Not event_system Then
4451  ret = -ENOMEM
4452  Go to free
4455  ret = action_parse(tr, str, data, HANDLER_ONMATCH)
4456  If ret Then Go to free
4458  out :
4459  Return data
4460  free :
4461  onmatch_destroy(data)
4462  data = ERR_PTR(ret)
4463  Go to out
Caller
NameDescribe
parse_actions