Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:set_trigger_filter - Generic event_command @set_filter implementation*@filter_str: The filter string for the trigger, NULL to remove filter*@trigger_data: Trigger-specific data*@file: The trace_event_file associated with the event* Common implementation

Proto:int set_trigger_filter(char *filter_str, struct event_trigger_data *trigger_data, struct trace_event_file *file)

Type:int

Parameter:

TypeParameterName
char *filter_str
struct event_trigger_data *trigger_data
struct trace_event_file *file
730  data = trigger_data
731  filter = NULL
732  ret = -EINVAL
735  If Not filter_str Then Go to assign
738  s = 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
740  If Not strlen - Find the length of a string*@s: The string to be sized || strcmp(s, "if") != 0 Then Go to out
743  If Not filter_str Then Go to out
747  ret = create_event_filter(tr, event_call, filter_str, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., & filter)
753  assign :
754  tmp = cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(filter)
756  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(filter, filter)
758  If tmp Then
760  tracepoint_synchronize_unregister()
761  free_event_filter(tmp)
764  kfree(filter_str)
765  filter_str = NULL
767  If filter_str Then
768  filter_str = kstrdup(filter_str, GFP_KERNEL)
769  If Not filter_str Then
771  filter = NULL
772  ret = -ENOMEM
775  out :
776  Return ret