Function report |
Source Code:kernel\trace\trace_events_hist.c |
Create Date:2022-07-28 12:31:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:reate_field_var_hist - Automatically create a histogram and var for a field*@target_hist_data: The target hist trigger*@subsys_name: Optional subsystem name*@event_name: Optional event name*@field_name: The name of the field (and the resulting variable)*
Proto:static struct hist_field *create_field_var_hist(struct hist_trigger_data *target_hist_data, char *subsys_name, char *event_name, char *field_name)
Type:struct hist_field
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct hist_trigger_data * | target_hist_data | |
| char * | subsys_name | |
| char * | event_name | |
| char * | field_name |
| 3300 | If n_field_var_hists >= SYNTH_FIELDS_MAX Then |
| 3305 | file = event_file(tr, subsys_name, event_name) |
| 3320 | If Not hist_data Then |
| 3321 | hist_err(tr, HIST_ERR_HIST_NOT_FOUND, errpos(field_name)) |
| 3328 | If Not IS_ERR_OR_NULL(event_var) Then Return event_var |
| 3331 | var_hist = 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). |
| 3335 | cmd = 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). |
| 3336 | If Not cmd Then |
| 3349 | first = false |
| 3354 | strcat(cmd, field_name) |
| 3356 | strcat(cmd, field_name) |
| 3359 | saved_filter = find_trigger_filter(hist_data, file) |
| 3360 | If saved_filter Then |
| 3362 | strcat(cmd, saved_filter) |
| 3365 | cmd = kstrdup(cmd, GFP_KERNEL) |
| 3366 | If Not cmd Then |
| 3376 | ret = event_hist_trigger_func( & trigger_hist_cmd, file, "", "hist", cmd) |
| 3378 | If ret Then |
| 3382 | hist_err(tr, HIST_ERR_HIST_CREATE_FAIL, errpos(field_name)) |
| 3391 | If IS_ERR_OR_NULL(event_var) Then |
| 3398 | n = n_field_var_hists |
| 3399 | field_var_hists[n] = var_hist |
| 3400 | n_field_var_hists++ |
| 3402 | Return event_var |
| Name | Describe |
|---|---|
| trace_action_create_field_var |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |