Lines Matching refs:state
1732 struct synth_event_trace_state state; in synth_event_trace() local
1736 ret = __synth_event_trace_init(file, &state); in synth_event_trace()
1743 if (state.event->n_dynamic_fields) { in synth_event_trace()
1746 for (i = 0; i < state.event->n_fields; i++) { in synth_event_trace()
1749 if (state.event->fields[i]->is_string && in synth_event_trace()
1750 state.event->fields[i]->is_dynamic) { in synth_event_trace()
1760 ret = __synth_event_trace_start(file, &state, data_size); in synth_event_trace()
1764 if (n_vals != state.event->n_fields) { in synth_event_trace()
1772 for (i = 0, n_u64 = 0; i < state.event->n_fields; i++) { in synth_event_trace()
1777 if (state.event->fields[i]->is_string) { in synth_event_trace()
1780 len = trace_string(state.entry, state.event, str_val, in synth_event_trace()
1781 state.event->fields[i]->is_dynamic, in synth_event_trace()
1785 struct synth_field *field = state.event->fields[i]; in synth_event_trace()
1789 *(u8 *)&state.entry->fields[n_u64] = (u8)val; in synth_event_trace()
1793 *(u16 *)&state.entry->fields[n_u64] = (u16)val; in synth_event_trace()
1797 *(u32 *)&state.entry->fields[n_u64] = (u32)val; in synth_event_trace()
1801 state.entry->fields[n_u64] = val; in synth_event_trace()
1809 __synth_event_trace_end(&state); in synth_event_trace()
1837 struct synth_event_trace_state state; in synth_event_trace_array() local
1841 ret = __synth_event_trace_init(file, &state); in synth_event_trace_array()
1848 if (state.event->n_dynamic_fields) { in synth_event_trace_array()
1849 for (i = 0; i < state.event->n_dynamic_fields; i++) { in synth_event_trace_array()
1850 field_pos = state.event->dynamic_fields[i]->field_pos; in synth_event_trace_array()
1857 ret = __synth_event_trace_start(file, &state, data_size); in synth_event_trace_array()
1861 if (n_vals != state.event->n_fields) { in synth_event_trace_array()
1868 for (i = 0, n_u64 = 0; i < state.event->n_fields; i++) { in synth_event_trace_array()
1869 if (state.event->fields[i]->is_string) { in synth_event_trace_array()
1872 len = trace_string(state.entry, state.event, str_val, in synth_event_trace_array()
1873 state.event->fields[i]->is_dynamic, in synth_event_trace_array()
1877 struct synth_field *field = state.event->fields[i]; in synth_event_trace_array()
1882 *(u8 *)&state.entry->fields[n_u64] = (u8)val; in synth_event_trace_array()
1886 *(u16 *)&state.entry->fields[n_u64] = (u16)val; in synth_event_trace_array()
1890 *(u32 *)&state.entry->fields[n_u64] = (u32)val; in synth_event_trace_array()
1894 state.entry->fields[n_u64] = val; in synth_event_trace_array()
1901 __synth_event_trace_end(&state); in synth_event_trace_array()