Function report |
Source Code:kernel\trace\trace_events_hist.c |
Create Date:2022-07-28 12:32:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:create_key_field
Proto:static int create_key_field(struct hist_trigger_data *hist_data, unsigned int key_idx, unsigned int key_offset, struct trace_event_file *file, char *field_str)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct hist_trigger_data * | hist_data | |
unsigned int | key_idx | |
unsigned int | key_offset | |
struct trace_event_file * | file | |
char * | field_str |
4585 | struct hist_field * hist_field = NULL |
4586 | flags = 0 |
4588 | ret = 0 |
4590 | If WARN_ON(key_idx >= HIST_FIELDS_MAX) Then Return -EINVAL |
4593 | flags |= HIST_FIELD_FL_KEY |
4596 | flags |= HIST_FIELD_FL_STACKTRACE |
4597 | key_size = sizeof(unsignedlong) * HIST_STACKTRACE_DEPTH |
4598 | hist_field = create_hist_field(hist_data, NULL, flags, NULL) |
4599 | Else |
4600 | hist_field = parse_expr(hist_data, file, field_str, flags, NULL, 0) |
4602 | If IS_ERR(hist_field) Then |
4603 | ret = PTR_ERR(hist_field) |
4604 | Go to out |
4607 | If field_has_hist_vars(hist_field, 0) Then |
4608 | hist_err(tr, HIST_ERR_INVALID_REF_KEY, errpos(field_str)) |
4609 | destroy_hist_field(hist_field, 0) |
4611 | Go to out |
4617 | fields[key_idx] = hist_field |
4619 | key_size = @a is a power of 2 value (key_size, sizeof(u64)) |
4621 | offset = key_offset |
4625 | If key_size > HIST_KEY_SIZE_MAX Then |
4630 | n_keys++ |
4631 | n_fields++ |
4633 | If WARN_ON(n_keys > TRACING_MAP_KEYS_MAX) Then Return -EINVAL |
4637 | out : |
4638 | Return ret |
Name | Describe |
---|---|
create_key_fields |
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 |