函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:create_field_var

函数原型:static struct field_var *create_field_var(struct hist_trigger_data *hist_data, struct trace_event_file *file, char *field_name)

返回类型:struct field_var

参数:

类型参数名称
struct hist_trigger_data *hist_data
struct trace_event_file *file
char *field_name
3525  struct hist_field * val = NULL, * var = NULL
3526  flags等于HIST_FIELD_FL_VAR
3527  tr等于tr
3529  ret等于0
3531  如果n_field_vars大于等于SYNTH_FIELDS_MAX
3532  hist_err(tr, HIST_ERR_TOO_MANY_FIELD_VARS, errpos(field_name))
3533  ret等于负EINVAL
3534  转到:err
3537  val等于parse_atom(hist_data, file, field_name, & flags, NULL)
3538  如果是错误
3539  hist_err(tr, HIST_ERR_FIELD_VAR_PARSE_FAIL, errpos(field_name))
3540  ret等于错误
3541  转到:err
3544  var等于create_var(hist_data, file, field_name, size, type)
3545  如果是错误
3546  hist_err(tr, HIST_ERR_VAR_CREATE_FIND_FAIL, errpos(field_name))
3547  kfree(val)
3548  ret等于错误
3549  转到:err
3552  field_var等于分配内存并置零
3553  如果非field_var
3554  kfree(val)
3555  kfree(var)
3556  ret等于负ENOMEM
3557  转到:err
3560  var等于var
3561  val等于val
3562  out :
3563  返回:field_var
3564  err :
3565  field_var等于错误号
3566  转到:out
调用者
名称描述
create_target_field_varreate_target_field_var - Automatically create a variable for a field*@target_hist_data: The target hist trigger*@subsys_name: Optional subsystem name*@event_name: Optional event name*@var_name: The name of the field (and the resulting variable)* Hist