函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:event_enable_trigger_func

函数原型:int event_enable_trigger_func(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
1359  tr等于tr
1362  bool hist = false
1368  如果非param则返回:负EINVAL
1372  trigger等于分割字符串
1373  如果非trigger则返回:负EINVAL
1376  system等于分割字符串
1377  如果非trigger则返回:负EINVAL
1380  event等于分割字符串
1382  ret等于负EINVAL
1383  event_enable_file等于Returns valid trace event files that match system and event
1384  如果非event_enable_file则转到:out
1394  enable等于字符串比较恒等于0
1396  trigger_ops等于get_trigger_ops(cmd, trigger)
1398  ret等于负ENOMEM
1399  trigger_data等于分配内存并置零
1400  如果非trigger_data则转到:out
1403  enable_data等于分配内存并置零
1404  如果非enable_data
1405  kfree(trigger_data)
1406  转到:out
1409  count等于负1
1410  ops等于trigger_ops
1411  cmd_ops等于cmd_ops
1412  初始化链表头
1413  RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(filter, NULL)
1415  hist等于hist
1416  enable等于enable
1417  file等于event_enable_file
1418  private_data等于enable_data
1420  如果glob[0]恒等于'!'则
1421  unreg(glob + 1, trigger_ops, trigger_data, file)
1422  kfree(trigger_data)
1423  kfree(enable_data)
1424  ret等于0
1425  转到:out
1429  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
1431  如果trigger
1432  number等于分割字符串
1434  ret等于负EINVAL
1435  如果非strlen - Find the length of a string*@s: The string to be sized则转到:out_free
1442  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.
1443  如果ret则转到:out_free
1447  如果非param则转到:out_reg
1450  如果非set_filter则转到:out_reg
1453  ret等于set_filter(param, trigger_data, file)
1454  如果ret小于0则转到:out_free
1457  out_reg :
1459  ret等于判断模块是否处于活动状态
1460  如果非ret
1461  ret等于负EBUSY
1462  转到:out_free
1465  ret等于trace_event_enable_disable(event_enable_file, 1, 1)
1466  如果ret小于0则转到:out_put
1468  ret等于reg(glob, trigger_ops, trigger_data, file)
1474  如果非ret
1475  ret等于负ENOENT
1476  转到:out_disable
1477  否则如果ret小于0则转到:out_disable
1480  ret等于0
1481  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
1482  out :
1483  返回:ret
1485  out_disable :
1486  trace_event_enable_disable(event_enable_file, 0, 1)
1487  out_put :
1488  module_put(mod)
1489  out_free :
1490  如果set_filterset_filter(NULL, trigger_data, NULL)
1492  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
1493  kfree(enable_data)
1494  转到:out