函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:action_parse

函数原型:static int action_parse(struct trace_array *tr, char *str, struct action_data *data, enum handler_id handler)

返回类型:int

参数:

类型参数名称
struct trace_array *tr
char *str
struct action_data *data
enum handler_idhandler
3974  ret等于0
3976  分割字符串
3977  如果非str
3978  hist_err(tr, HIST_ERR_ACTION_NOT_FOUND, 0)
3979  ret等于负EINVAL
3980  转到:out
3983  action_name等于分割字符串
3984  如果非action_name或非str
3985  hist_err(tr, HIST_ERR_ACTION_NOT_FOUND, 0)
3986  ret等于负EINVAL
3987  转到:out
3990  如果str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to
3991  params等于分割字符串
3993  如果非params
3995  ret等于负EINVAL
3996  转到:out
3999  ret等于parse_action_params(tr, params, data)
4000  如果ret则转到:out
4003  如果handler恒等于HANDLER_ONMAXcheck_val等于check_track_val_max
4005  否则如果handler恒等于HANDLER_ONCHANGEcheck_val等于check_track_val_changed
4007  否则
4009  ret等于负EINVAL
4010  转到:out
4013  save_data等于save_track_data_vars
4014  fn等于ontrack_action
4015  action等于ACTION_SAVE
4016  否则如果str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to
4017  params等于分割字符串
4019  如果非str
4021  ret等于负EINVAL
4022  转到:out
4025  如果handler恒等于HANDLER_ONMAXcheck_val等于check_track_val_max
4027  否则如果handler恒等于HANDLER_ONCHANGEcheck_val等于check_track_val_changed
4029  否则
4031  ret等于负EINVAL
4032  转到:out
4035  save_data等于save_track_data_snapshot
4036  fn等于ontrack_action
4037  action等于ACTION_SNAPSHOT
4038  否则
4039  params等于分割字符串
4041  如果str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to use_trace_keyword = true
4044  如果params
4046  如果ret则转到:out
4050  如果handler恒等于HANDLER_ONMAXcheck_val等于check_track_val_max
4052  否则如果handler恒等于HANDLER_ONCHANGEcheck_val等于check_track_val_changed
4055  如果handler不等于HANDLER_ONMATCH
4056  save_data等于action_trace
4057  fn等于ontrack_action
4058  否则fn等于action_trace
4061  action等于ACTION_TRACE
4064  action_name等于kstrdup(action_name, GFP_KERNEL)
4065  如果非action_name
4066  ret等于负ENOMEM
4067  转到:out
4070  handler等于handler
4071  out :
4072  返回:ret
调用者
名称描述
track_data_parse
onmatch_parse