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:31:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:track_data_create

Proto:static int track_data_create(struct hist_trigger_data *hist_data, struct action_data *data)

Type:int

Parameter:

TypeParameterName
struct hist_trigger_data *hist_data
struct action_data *data
3877  struct hist_field * var_field, * ref_field, * track_var = NULL
3878  file = event_file
3879  tr = tr
3881  ret = 0
3883  track_data_var_str = var_str
3884  If track_data_var_str[0] != '$' Then
3885  hist_err(tr, HIST_ERR_ONX_NOT_VAR, errpos(track_data_var_str))
3886  Return -EINVAL
3888  track_data_var_str++
3890  var_field = find_target_event_var(hist_data, NULL, NULL, track_data_var_str)
3891  If Not var_field Then
3892  hist_err(tr, HIST_ERR_ONX_VAR_NOT_FOUND, errpos(track_data_var_str))
3893  Return -EINVAL
3896  ref_field = reate_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
3897  If Not ref_field Then Return -ENOMEM
3900  var_ref = ref_field
3902  If handler == HANDLER_ONMAX Then track_var = create_var(hist_data, file, "__max", sizeof(u64), "u64")
3904  If IS_ERR(track_var) Then
3905  hist_err(tr, HIST_ERR_ONX_VAR_CREATE_FAIL, 0)
3906  ret = PTR_ERR(track_var)
3907  Go to out
3910  If handler == HANDLER_ONCHANGE Then track_var = create_var(hist_data, file, "__change", sizeof(u64), "u64")
3912  If IS_ERR(track_var) Then
3913  hist_err(tr, HIST_ERR_ONX_VAR_CREATE_FAIL, 0)
3914  ret = PTR_ERR(track_var)
3915  Go to out
3917  track_var = track_var
3919  ret = action_create(hist_data, data)
3920  out :
3921  Return ret
Caller
NameDescribe
create_actions