函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:init_var_ref

函数原型:static int init_var_ref(struct hist_field *ref_field, struct hist_field *var_field, char *system, char *event_name)

返回类型:int

参数:

类型参数名称
struct hist_field *ref_field
struct hist_field *var_field
char *system
char *event_name
2604  err等于0
2606  idx等于idx
2607  hist_data等于hist_data
2608  size等于size
2609  is_signed等于is_signed
2610  flags或等于flags按位与HIST_FIELD_FL_TIMESTAMP按位或HIST_FIELD_FL_TIMESTAMP_USECS的值
2613  如果system
2614  system等于kstrdup(system, GFP_KERNEL)
2615  如果非system则返回:负ENOMEM
2619  如果event_name
2620  event_name等于kstrdup(event_name, GFP_KERNEL)
2621  如果非event_name
2622  err等于负ENOMEM
2623  转到:free
2627  如果name
2628  * The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name.等于kstrdup(name, GFP_KERNEL)
2630  err等于负ENOMEM
2631  转到:free
2633  否则如果* The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name.
2634  * The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name.等于kstrdup(* The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name., GFP_KERNEL)
2636  err等于负ENOMEM
2637  转到:free
2641  type等于kstrdup(type, GFP_KERNEL)
2642  如果非type
2643  err等于负ENOMEM
2644  转到:free
2646  out :
2647  返回:err
2648  free :
2649  kfree(system)
2650  kfree(event_name)
2651  kfree(* The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name.)
2653  转到:out
调用者
名称描述
create_var_refreate_var_ref - Create a variable reference and attach it to trigger*@hist_data: The trigger that will be referencing the variable*@var_field: The VAR field to create a reference to*@system: The optional system string*@event_name: The optional event_name
create_alias