+ /* Parent PID */
+ parent_pid = ltt_event_get_unsigned(e, thf->f2);
+
+ /* Command name */
+ command = ltt_event_get_string(e, thf->f3);
+
+ /* mode */
+ f4 = ltt_eventtype_field_by_name(et, LTT_FIELD_MODE);
+ mode = ltt_enum_string_get(ltt_field_type(f4),
+ ltt_event_get_unsigned(e, f4));
+
+ /* submode */
+ f5 = ltt_eventtype_field_by_name(et, LTT_FIELD_SUBMODE);
+ submode = ltt_enum_string_get(ltt_field_type(f5),
+ ltt_event_get_unsigned(e, f5));
+
+ /* status */
+ f6 = ltt_eventtype_field_by_name(et, LTT_FIELD_STATUS);
+ status = ltt_enum_string_get(ltt_field_type(f6),
+ ltt_event_get_unsigned(e, f6));
+
+ /* The process might exist if a process was forked while performing the sate dump. */
+ process = lttv_state_find_process(ts, ANY_CPU, pid);
+ if(process == NULL) {
+ parent_process = lttv_state_find_process(ts, ANY_CPU, parent_pid);
+ process = lttv_state_create_process(ts, parent_process, cpu,
+ pid, g_quark_from_string(command),
+ &s->parent.timestamp);
+
+ /* Keep the stack bottom : a running user mode */
+#if 0
+ /* Disabled because of inconsistencies in the current statedump states. */
+ if(mode == LTTV_STATE_USER_MODE) {
+ /* Only keep the bottom */
+ process->execution_stack = g_array_set_size(process->execution_stack, 1);
+ } else {
+ /* On top of it : */
+ LttvExecutionState *es;
+ es = process->state = &g_array_index(process->execution_stack,
+ LttvExecutionState, 1);
+ es->t = mode;
+ es->s = status;
+ es->n = submode;
+ }
+#endif //0