Lines Matching refs:field
586 struct synth_field *field = event->fields[i]; in trace_event_raw_event_synth() local
589 switch (field->size) { in trace_event_raw_event_synth()
681 static void free_synth_field(struct synth_field *field) in free_synth_field() argument
683 kfree(field->type); in free_synth_field()
684 kfree(field->name); in free_synth_field()
685 kfree(field); in free_synth_field()
709 struct synth_field *field; in parse_synth_field() local
735 field = kzalloc(sizeof(*field), GFP_KERNEL); in parse_synth_field()
736 if (!field) in parse_synth_field()
744 field->name = kmemdup_nul(field_name, len, GFP_KERNEL); in parse_synth_field()
745 if (!field->name) in parse_synth_field()
748 if (!is_good_name(field->name)) { in parse_synth_field()
762 field->type = kzalloc(len, GFP_KERNEL); in parse_synth_field()
763 if (!field->type) in parse_synth_field()
766 seq_buf_init(&s, field->type, len); in parse_synth_field()
777 size = synth_field_size(field->type); in parse_synth_field()
786 if (synth_field_is_string(field->type) || in parse_synth_field()
787 synth_field_is_stack(field->type)) { in parse_synth_field()
790 len = sizeof("__data_loc ") + strlen(field->type) + 1; in parse_synth_field()
797 seq_buf_puts(&s, field->type); in parse_synth_field()
803 kfree(field->type); in parse_synth_field()
804 field->type = type; in parse_synth_field()
806 field->is_dynamic = true; in parse_synth_field()
814 field->size = size; in parse_synth_field()
816 if (synth_field_is_string(field->type)) in parse_synth_field()
817 field->is_string = true; in parse_synth_field()
818 else if (synth_field_is_stack(field->type)) in parse_synth_field()
819 field->is_stack = true; in parse_synth_field()
821 field->is_signed = synth_field_signed(field->type); in parse_synth_field()
823 return field; in parse_synth_field()
825 free_synth_field(field); in parse_synth_field()
826 field = ERR_PTR(ret); in parse_synth_field()
1289 struct synth_field *field, *fields[SYNTH_FIELDS_MAX]; in __create_synth_event() local
1343 field = parse_synth_field(argc - consumed, in __create_synth_event()
1346 if (IS_ERR(field)) { in __create_synth_event()
1347 ret = PTR_ERR(field); in __create_synth_event()
1379 fields[n_fields++] = field; in __create_synth_event()
1785 struct synth_field *field = state.event->fields[i]; in synth_event_trace() local
1787 switch (field->size) { in synth_event_trace()
1877 struct synth_field *field = state.event->fields[i]; in synth_event_trace_array() local
1880 switch (field->size) { in synth_event_trace_array()
1962 struct synth_field *field = NULL; in __synth_event_add_val() local
1993 field = event->fields[i]; in __synth_event_add_val()
1994 if (strcmp(field->name, field_name) == 0) in __synth_event_add_val()
1997 if (!field) { in __synth_event_add_val()
2006 field = event->fields[trace_state->cur_field++]; in __synth_event_add_val()
2010 if (field->is_string) { in __synth_event_add_val()
2014 if (field->is_dynamic) { /* add_val can't do dynamic strings */ in __synth_event_add_val()
2024 str_field = (char *)&entry->fields[field->offset]; in __synth_event_add_val()
2027 switch (field->size) { in __synth_event_add_val()
2029 *(u8 *)&trace_state->entry->fields[field->offset] = (u8)val; in __synth_event_add_val()
2033 *(u16 *)&trace_state->entry->fields[field->offset] = (u16)val; in __synth_event_add_val()
2037 *(u32 *)&trace_state->entry->fields[field->offset] = (u32)val; in __synth_event_add_val()
2041 trace_state->entry->fields[field->offset] = val; in __synth_event_add_val()
2228 struct synth_field *field; in __synth_event_show() local
2235 field = event->fields[i]; in __synth_event_show()
2237 type = field->type; in __synth_event_show()
2245 seq_printf(m, "%s %s%s", type, field->name, in __synth_event_show()