Lines Matching refs:fields

109 	u64			fields[];  member
115 int offset = offsetof(typeof(trace), fields); in synth_event_define_fields()
123 size = event->fields[i]->size; in synth_event_define_fields()
124 is_signed = event->fields[i]->is_signed; in synth_event_define_fields()
125 type = event->fields[i]->type; in synth_event_define_fields()
126 name = event->fields[i]->name; in synth_event_define_fields()
132 event->fields[i]->offset = n_u64; in synth_event_define_fields()
134 if (event->fields[i]->is_string && !event->fields[i]->is_dynamic) { in synth_event_define_fields()
333 fmt = synth_field_fmt(se->fields[i]->type); in print_synth_event()
342 if (se->fields[i]->is_string) { in print_synth_event()
343 if (se->fields[i]->is_dynamic) { in print_synth_event()
347 offset = (u32)entry->fields[n_u64]; in print_synth_event()
352 trace_seq_printf(s, print_fmt, se->fields[i]->name, in print_synth_event()
358 trace_seq_printf(s, print_fmt, se->fields[i]->name, in print_synth_event()
360 (char *)&entry->fields[n_u64], in print_synth_event()
370 se->fields[i]->name, in print_synth_event()
371 se->fields[i]->size, in print_synth_event()
372 entry->fields[n_u64], in print_synth_event()
375 if (strcmp(se->fields[i]->type, "gfp_t") == 0) { in print_synth_event()
378 entry->fields[n_u64], in print_synth_event()
408 data_offset = offsetof(typeof(*entry), fields); in trace_string()
418 *(u32 *)&entry->fields[*n_u64] = data_offset; in trace_string()
422 str_field = (char *)&entry->fields[*n_u64]; in trace_string()
476 if (event->fields[i]->is_string) { in trace_event_raw_event_synth()
480 event->fields[i]->is_dynamic, in trace_event_raw_event_synth()
484 struct synth_field *field = event->fields[i]; in trace_event_raw_event_synth()
489 *(u8 *)&entry->fields[n_u64] = (u8)val; in trace_event_raw_event_synth()
493 *(u16 *)&entry->fields[n_u64] = (u16)val; in trace_event_raw_event_synth()
497 *(u32 *)&entry->fields[n_u64] = (u32)val; in trace_event_raw_event_synth()
501 entry->fields[n_u64] = val; in trace_event_raw_event_synth()
533 fmt = synth_field_fmt(event->fields[i]->type); in __set_synth_event_print_fmt()
535 event->fields[i]->name, fmt, in __set_synth_event_print_fmt()
541 if (event->fields[i]->is_string && in __set_synth_event_print_fmt()
542 event->fields[i]->is_dynamic) in __set_synth_event_print_fmt()
544 ", __get_str(%s)", event->fields[i]->name); in __set_synth_event_print_fmt()
547 ", REC->%s", event->fields[i]->name); in __set_synth_event_print_fmt()
789 INIT_LIST_HEAD(&call->class->fields); in register_synth_event()
841 free_synth_field(event->fields[i]); in free_synth_event()
843 kfree(event->fields); in free_synth_event()
853 struct synth_field **fields) in alloc_synth_event() argument
871 event->fields = kcalloc(n_fields, sizeof(*event->fields), GFP_KERNEL); in alloc_synth_event()
872 if (!event->fields) { in alloc_synth_event()
879 if (fields[i]->is_dynamic) in alloc_synth_event()
896 fields[i]->field_pos = i; in alloc_synth_event()
897 event->fields[i] = fields[i]; in alloc_synth_event()
899 if (fields[i]->is_dynamic) in alloc_synth_event()
900 event->dynamic_fields[j++] = fields[i]; in alloc_synth_event()
1024 struct synth_field_desc *fields, in synth_event_add_fields() argument
1031 if (fields[i].type == NULL || fields[i].name == NULL) { in synth_event_add_fields()
1036 ret = synth_event_add_field(cmd, fields[i].type, fields[i].name); in synth_event_add_fields()
1144 struct synth_field_desc *fields, in synth_event_gen_cmd_array_start() argument
1167 if (fields[i].type == NULL || fields[i].name == NULL) in synth_event_gen_cmd_array_start()
1170 ret = synth_event_add_field(cmd, fields[i].type, fields[i].name); in synth_event_gen_cmd_array_start()
1182 struct synth_field *field, *fields[SYNTH_FIELDS_MAX]; in __create_synth_event() local
1267 fields[n_fields++] = field; in __create_synth_event()
1292 event = alloc_synth_event(name, n_fields, fields); in __create_synth_event()
1313 free_synth_field(fields[i]); in __create_synth_event()
1342 int synth_event_create(const char *name, struct synth_field_desc *fields, in synth_event_create() argument
1356 fields, n_fields); in synth_event_create()
1464 char *name = NULL, *fields, *p; in create_or_delete_synth_event() local
1495 fields = skip_spaces(p); in create_or_delete_synth_event()
1497 ret = __create_synth_event(name, fields); in create_or_delete_synth_event()
1644 if (state.event->fields[i]->is_string && in synth_event_trace()
1645 state.event->fields[i]->is_dynamic) { in synth_event_trace()
1672 if (state.event->fields[i]->is_string) { in synth_event_trace()
1676 state.event->fields[i]->is_dynamic, in synth_event_trace()
1680 struct synth_field *field = state.event->fields[i]; in synth_event_trace()
1684 *(u8 *)&state.entry->fields[n_u64] = (u8)val; in synth_event_trace()
1688 *(u16 *)&state.entry->fields[n_u64] = (u16)val; in synth_event_trace()
1692 *(u32 *)&state.entry->fields[n_u64] = (u32)val; in synth_event_trace()
1696 state.entry->fields[n_u64] = val; in synth_event_trace()
1764 if (state.event->fields[i]->is_string) { in synth_event_trace_array()
1768 state.event->fields[i]->is_dynamic, in synth_event_trace_array()
1772 struct synth_field *field = state.event->fields[i]; in synth_event_trace_array()
1777 *(u8 *)&state.entry->fields[n_u64] = (u8)val; in synth_event_trace_array()
1781 *(u16 *)&state.entry->fields[n_u64] = (u16)val; in synth_event_trace_array()
1785 *(u32 *)&state.entry->fields[n_u64] = (u32)val; in synth_event_trace_array()
1789 state.entry->fields[n_u64] = val; in synth_event_trace_array()
1888 field = event->fields[i]; in __synth_event_add_val()
1901 field = event->fields[trace_state->cur_field++]; in __synth_event_add_val()
1919 str_field = (char *)&entry->fields[field->offset]; in __synth_event_add_val()
1924 *(u8 *)&trace_state->entry->fields[field->offset] = (u8)val; in __synth_event_add_val()
1928 *(u16 *)&trace_state->entry->fields[field->offset] = (u16)val; in __synth_event_add_val()
1932 *(u32 *)&trace_state->entry->fields[field->offset] = (u32)val; in __synth_event_add_val()
1936 trace_state->entry->fields[field->offset] = val; in __synth_event_add_val()
2047 char *fields, *p; in create_synth_event() local
2063 fields = skip_spaces(p); in create_synth_event()
2093 ret = __create_synth_event(name, fields); in create_synth_event()
2129 field = event->fields[i]; in __synth_event_show()