Lines Matching refs:trace_state
1629 struct synth_event_trace_state *trace_state) in __synth_event_trace_init() argument
1633 memset(trace_state, '\0', sizeof(*trace_state)); in __synth_event_trace_init()
1646 trace_state->disabled = true; in __synth_event_trace_init()
1651 trace_state->event = file->event_call->data; in __synth_event_trace_init()
1658 struct synth_event_trace_state *trace_state, in __synth_event_trace_start() argument
1664 fields_size = trace_state->event->n_u64 * sizeof(u64); in __synth_event_trace_start()
1671 trace_state->buffer = file->tr->array_buffer.buffer; in __synth_event_trace_start()
1672 ring_buffer_nest_start(trace_state->buffer); in __synth_event_trace_start()
1674 entry_size = sizeof(*trace_state->entry) + fields_size; in __synth_event_trace_start()
1675 trace_state->entry = trace_event_buffer_reserve(&trace_state->fbuffer, in __synth_event_trace_start()
1678 if (!trace_state->entry) { in __synth_event_trace_start()
1679 ring_buffer_nest_end(trace_state->buffer); in __synth_event_trace_start()
1687 __synth_event_trace_end(struct synth_event_trace_state *trace_state) in __synth_event_trace_end() argument
1689 trace_event_buffer_commit(&trace_state->fbuffer); in __synth_event_trace_end()
1691 ring_buffer_nest_end(trace_state->buffer); in __synth_event_trace_end()
1920 struct synth_event_trace_state *trace_state) in synth_event_trace_start() argument
1924 if (!trace_state) in synth_event_trace_start()
1927 ret = __synth_event_trace_init(file, trace_state); in synth_event_trace_start()
1934 if (trace_state->event->n_dynamic_fields) in synth_event_trace_start()
1937 ret = __synth_event_trace_start(file, trace_state, 0); in synth_event_trace_start()
1944 struct synth_event_trace_state *trace_state) in __synth_event_add_val() argument
1951 if (!trace_state) { in __synth_event_add_val()
1958 if (trace_state->add_next) { in __synth_event_add_val()
1962 trace_state->add_name = true; in __synth_event_add_val()
1964 if (trace_state->add_name) { in __synth_event_add_val()
1968 trace_state->add_next = true; in __synth_event_add_val()
1971 if (trace_state->disabled) in __synth_event_add_val()
1974 event = trace_state->event; in __synth_event_add_val()
1975 if (trace_state->add_name) { in __synth_event_add_val()
1986 if (trace_state->cur_field >= event->n_fields) { in __synth_event_add_val()
1990 field = event->fields[trace_state->cur_field++]; in __synth_event_add_val()
1993 entry = trace_state->entry; in __synth_event_add_val()
2013 trace_state->entry->fields[field->offset].as_u8 = (u8)val; in __synth_event_add_val()
2017 trace_state->entry->fields[field->offset].as_u16 = (u16)val; in __synth_event_add_val()
2021 trace_state->entry->fields[field->offset].as_u32 = (u32)val; in __synth_event_add_val()
2025 trace_state->entry->fields[field->offset].as_u64 = val; in __synth_event_add_val()
2062 struct synth_event_trace_state *trace_state) in synth_event_add_next_val() argument
2064 return __synth_event_add_val(NULL, val, trace_state); in synth_event_add_next_val()
2097 struct synth_event_trace_state *trace_state) in synth_event_add_val() argument
2099 return __synth_event_add_val(field_name, val, trace_state); in synth_event_add_val()
2123 int synth_event_trace_end(struct synth_event_trace_state *trace_state) in synth_event_trace_end() argument
2125 if (!trace_state) in synth_event_trace_end()
2128 __synth_event_trace_end(trace_state); in synth_event_trace_end()