tc = self->parent.traces[i];
tcs = (LttvTraceState *)tc;
tcs->save_interval = 100000;
- tcs->recompute_state_in_seek = false;
- tcs->saved_state_ready = false;
+ tcs->recompute_state_in_seek = TRUE;
+ tcs->saved_state_ready = FALSE;
fill_name_tables(tcs);
nb_control = ltt_trace_control_tracefile_number(tc->t);
return process;
}
-
LttvProcessState *lttv_state_find_process(LttvTracefileState *tfs,
guint pid)
{
return process;
}
+LttvProcessState *lttv_state_find_process_from_trace(LttvTraceState *ts,
+ guint pid)
+{
+ LttvProcessState *process = g_hash_table_lookup(ts->processes,
+ GUINT_TO_POINTER(pid));
+ //We do not create a process at this level, because we can be called
+ //from outside of state.c, and therefore cannot assume a tracefile
+ //exists.
+ //if(process == NULL) process = create_process_from_trace(ts, NULL, pid);
+ return process;
+}
+
+
static void exit_process(LttvTracefileState *tfs, LttvProcessState *process)
{
/* restore the closest earlier saved state */
if(min_pos != -1) lttv_state_restore(tcs, closest_tree);
- /* there is no earlier saved state, restart at T0 */
- else {
- restore_init_state(tcs);
- lttv_process_trace_seek_time(&(tcs->parent), ltt_time_zero);
- }
-
+ }
/* There is no saved state yet we want to have it. Restart at T0 */
else {
restore_init_state(tcs);
lttv_process_trace_seek_time(&(tcs->parent), ltt_time_zero);
}
-
+ }
/* We want to seek quickly without restoring/updating the state */
else {
restore_init_state(tcs);