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

Name:create_hist_data

Proto:static struct hist_trigger_data *create_hist_data(unsigned int map_bits, struct hist_trigger_attrs *attrs, struct trace_event_file *file, bool remove)

Type:struct hist_trigger_data

Parameter:

TypeParameterName
unsigned intmap_bits
struct hist_trigger_attrs *attrs
struct trace_event_file *file
boolremove
5194  const struct tracing_map_ops * map_ops = NULL
5196  ret = 0
5198  hist_data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
5199  If Not hist_data Then Return ERR_PTR( - ENOMEM)
5202  attrs = attrs
5203  remove = remove
5204  event_file = file
5206  ret = parse_actions(hist_data)
5207  If ret Then Go to free
5210  ret = create_hist_fields(hist_data, file)
5211  If ret Then Go to free
5214  ret = create_sort_keys(hist_data)
5215  If ret Then Go to free
5218  map_ops = hist_trigger_elt_data_ops
5220  map = racing_map_create - Create a lock-free map and element pool*@map_bits: The size of the map (2 ** map_bits)*@key_size: The size of the key for the map in bytes*@ops: Optional client-defined tracing_map_ops instance*@private_data: Client data associated
5222  If IS_ERR(map) Then
5223  ret = PTR_ERR(map)
5224  map = NULL
5225  Go to free
5228  ret = create_tracing_map_fields(hist_data)
5229  If ret Then Go to free
5231  out :
5232  Return hist_data
5233  free :
5234  attrs = NULL
5236  destroy_hist_data(hist_data)
5238  hist_data = ERR_PTR(ret)
5240  Go to out
Caller
NameDescribe
event_hist_trigger_func