函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_trigger.c Create Date:2022-07-27 13:34:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:vent_trigger_callback - Generic event_command @func implementation*@cmd_ops: The command ops, used for trigger registration*@file: The trace_event_file associated with the event*@glob: The raw string used to register the trigger*@cmd: The cmd portion of

函数原型:static int event_trigger_callback(struct event_command *cmd_ops, struct trace_event_file *file, char *glob, char *cmd, char *param)

返回类型:int

参数:

类型参数名称
struct event_command *cmd_ops
struct trace_event_file *file
char *glob
char *cmd
char *param
628  char * trigger = NULL
633  如果param是数字trigger等于分割字符串
636  trigger_ops等于get_trigger_ops(cmd, trigger)
638  ret等于负ENOMEM
639  trigger_data等于分配内存并置零
640  如果非trigger_data则转到:out
643  count等于负1
644  ops等于trigger_ops
645  cmd_ops等于cmd_ops
646  private_data等于file
647  初始化链表头
648  初始化链表头
650  如果glob[0]恒等于'!'则
651  unreg(glob + 1, trigger_ops, trigger_data, file)
652  kfree(trigger_data)
653  ret等于0
654  转到:out
657  如果trigger
658  number等于分割字符串
660  ret等于负EINVAL
661  如果非strlen - Find the length of a string*@s: The string to be sized则转到:out_free
668  ret等于kstrtoul - convert a string to an unsigned long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign, but not a minus sign.
669  如果ret则转到:out_free
673  如果非param则转到:out_reg
676  如果非set_filter则转到:out_reg
679  ret等于set_filter(param, trigger_data, file)
680  如果ret小于0则转到:out_free
683  out_reg :
685  vent_trigger_init - Generic event_trigger_ops @init implementation*@ops: The trigger ops associated with the trigger*@data: Trigger-specific data* Common implementation of event trigger initialization
686  ret等于reg(glob, trigger_ops, trigger_data, file)
692  如果非ret
693  unreg(glob, trigger_ops, trigger_data, file)
694  ret等于负ENOENT
695  否则如果ret大于0则ret等于0
699  vent_trigger_free - Generic event_trigger_ops @free implementation*@ops: The trigger ops associated with the trigger*@data: Trigger-specific data* Common implementation of event trigger de-initialization
700  out :
701  返回:ret
703  out_free :
704  如果set_filterset_filter(NULL, trigger_data, NULL)
706  kfree(trigger_data)
707  转到:out