Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_filter.c Create Date:2022-07-28 12:25:26
Last Modify:2022-05-22 20:19:57 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:process_system_preds

Proto:static int process_system_preds(struct trace_subsystem_dir *dir, struct trace_array *tr, struct filter_parse_error *pe, char *filter_string)

Type:int

Parameter:

TypeParameterName
struct trace_subsystem_dir *dir
struct trace_array *tr
struct filter_parse_error *pe
char *filter_string
1597  struct event_filter * filter = NULL
1599  LIST_HEAD(filter_list)
1600  bool fail = true
1605  If system != dir Then Continue
1608  filter = 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).
1609  If Not filter Then Go to fail_mem
1612  filter_string = kstrdup(filter_string, GFP_KERNEL)
1613  If Not filter_string Then Go to fail_mem
1616  err = process_preds(event_call, filter_string, filter, pe)
1617  If err Then
1618  filter_disable(file)
1619  parse_error(pe, FILT_ERR_BAD_SUBSYS_FILTER, 0)
1620  append_filter_err(tr, pe, filter)
1621  Else event_set_filtered_flag(file)
1625  filter_item = 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).
1626  If Not filter_item Then Go to fail_mem
1629  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1634  filter = event_filter(file)
1635  event_set_filter(file, filter)
1636  filter = NULL
1638  fail = false
1641  If fail Then Go to fail
1649  tracepoint_synchronize_unregister()
1651  __free_filter(filter)
1652  deletes entry from list
1653  kfree(filter_item)
1655  Return 0
1656  fail :
1659  deletes entry from list
1660  kfree(filter_item)
1662  parse_error(pe, FILT_ERR_BAD_SUBSYS_FILTER, 0)
1663  Return -EINVAL
1664  fail_mem :
1665  __free_filter(filter)
1667  If Not fail Then tracepoint_synchronize_unregister()
1670  __free_filter(filter)
1671  deletes entry from list
1672  kfree(filter_item)
1674  Return -ENOMEM
Caller
NameDescribe
create_system_filterreate_system_filter - create a filter for an event_subsystem*@system: event_subsystem to create a filter for*@filter_str: filter string*@filterp: out param for created filter (always updated on return)* Identical to create_filter() except that it creates