Lines Matching refs:field

28 	C(INVALID_CMD,		"Command must be of the form: <name> field[;field] ..."),\
29 C(INVALID_DYN_CMD, "Command must be of the form: s or -:[synthetic/]<name> field[;field] ..."),\
34 C(INVALID_FIELD, "Invalid field"), \
495 /* Fill in the field that holds the offset/len combo */
570 struct synth_field *field = event->fields[i];
573 switch (field->size) {
665 static void free_synth_field(struct synth_field *field)
667 kfree(field->type);
668 kfree(field->name);
669 kfree(field);
693 struct synth_field *field;
719 field = kzalloc(sizeof(*field), GFP_KERNEL);
720 if (!field)
728 field->name = kmemdup_nul(field_name, len, GFP_KERNEL);
729 if (!field->name)
732 if (!is_good_name(field->name)) {
746 field->type = kzalloc(len, GFP_KERNEL);
747 if (!field->type)
750 seq_buf_init(&s, field->type, len);
761 size = synth_field_size(field->type);
770 if (synth_field_is_string(field->type) ||
771 synth_field_is_stack(field->type)) {
774 len = sizeof("__data_loc ") + strlen(field->type) + 1;
781 seq_buf_puts(&s, field->type);
787 kfree(field->type);
788 field->type = type;
790 field->is_dynamic = true;
798 field->size = size;
800 if (synth_field_is_string(field->type))
801 field->is_string = true;
802 else if (synth_field_is_stack(field->type))
803 field->is_stack = true;
805 field->is_signed = synth_field_signed(field->type);
807 return field;
809 free_synth_field(field);
810 field = ERR_PTR(ret);
1014 * synth_event_add_field - Add a new field to a synthetic event cmd
1016 * @type: The type of the new field to add
1017 * @name: The name of the new field to add
1019 * Add a new field to a synthetic event cmd object. Field ordering is in
1023 * [n] the field is considered to be an array.
1056 * synth_event_add_field_str - Add a new field to a synthetic event cmd
1058 * @type_name: The type and name of the new field to add, as a single string
1060 * Add a new field to a synthetic event cmd object, as a single
1067 * [n] the field is considered to be an array.
1100 * @fields: An array of type/name field descriptions
1101 * @n_fields: The number of field descriptions contained in the fields array
1110 * [n] the field is considered to be an array.
1141 * @...: Variable number of arg (pairs), one pair for each field
1157 * of a type followed by a field name.
1160 * [n] the field is considered to be an array.
1214 * @fields: An array of type/name field descriptions
1215 * @n_fields: The number of field descriptions contained in the fields array
1230 * [n] the field is considered to be an array.
1274 struct synth_field *field, *fields[SYNTH_FIELDS_MAX];
1281 * - Add synthetic event: <event_name> field[;field] ...
1282 * - Remove synthetic event: !<event_name> field[;field] ...
1283 * where 'field' = type field_name
1328 field = parse_synth_field(argc - consumed,
1331 if (IS_ERR(field)) {
1332 ret = PTR_ERR(field);
1337 * Track the highest version of any field we
1347 * If we see more than 1 field per loop, it
1364 fields[n_fields++] = field;
1413 * @fields: An array of type/name field descriptions
1414 * @n_fields: The number of field descriptions contained in the fields array
1705 * of vals must match the number of field in the synthetic event, and
1770 struct synth_field *field = state.event->fields[i];
1772 switch (field->size) {
1809 * vals must match the number of field in the synthetic event, and
1862 struct synth_field *field = state.event->fields[i];
1865 switch (field->size) {
1897 * Start the trace of a synthetic event field-by-field rather than all
1902 * individual field values can be set through either
1912 * all field values succeeded or not.
1947 struct synth_field *field = NULL;
1978 field = event->fields[i];
1979 if (strcmp(field->name, field_name) == 0)
1982 if (!field) {
1991 field = event->fields[trace_state->cur_field++];
1995 if (field->is_string) {
1999 if (field->is_dynamic) { /* add_val can't do dynamic strings */
2009 str_field = (char *)&entry->fields[field->offset];
2012 switch (field->size) {
2014 trace_state->entry->fields[field->offset].as_u8 = (u8)val;
2018 trace_state->entry->fields[field->offset].as_u16 = (u16)val;
2022 trace_state->entry->fields[field->offset].as_u32 = (u32)val;
2026 trace_state->entry->fields[field->offset].as_u64 = val;
2035 * synth_event_add_next_val - Add the next field's value to an open synth trace
2036 * @val: The value to set the next field to
2039 * Set the value of the next field in an event that's been opened by
2047 * each field, in the order of the fields in the event, until all
2048 * fields have been set. If you'd rather set each field individually
2058 * adding all field values succeeded or not.
2070 * synth_event_add_val - Add a named field's value to an open synth trace
2071 * @field_name: The name of the synthetic event field value to set
2072 * @val: The value to set the named field to
2075 * Set the value of the named field in an event that's been opened by
2081 * This function looks up the field name, and if found, sets the field
2093 * adding all field values succeeded or not.
2119 * added for each event trace, regardless of whether adding all field
2213 struct synth_field *field;
2220 field = event->fields[i];
2222 type = field->type;
2230 seq_printf(m, "%s %s%s", type, field->name,