Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_hist.c Create Date:2022-07-28 12:30:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:init_var_ref

Proto:static int init_var_ref(struct hist_field *ref_field, struct hist_field *var_field, char *system, char *event_name)

Type:int

Parameter:

TypeParameterName
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  If system Then
2614  system = kstrdup(system, GFP_KERNEL)
2615  If Not system Then Return -ENOMEM
2619  If event_name Then
2620  event_name = kstrdup(event_name, GFP_KERNEL)
2621  If Not event_name Then
2622  err = -ENOMEM
2623  Go to free
2627  If name Then
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  Go to free
2633  Else if * The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name. Then
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  Go to free
2641  type = kstrdup(type, GFP_KERNEL)
2642  If Not type Then
2643  err = -ENOMEM
2644  Go to free
2646  out :
2647  Return 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  Go to out
Caller
NameDescribe
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