* @return The widget created.
*/
GtkWidget *
-h_guicontrolflow(Tab *tab, LttvTracesetSelector * s, char * key)
+h_guicontrolflow(Tab *tab)
{
- g_info("h_guicontrolflow, %p, %p, %s", tab, s, key);
+ g_info("h_guicontrolflow, %p", tab);
ControlFlowData *control_flow_data = guicontrolflow() ;
control_flow_data->tab = tab;
&height,
&hashed_process_data) == 1)
{
+ g_assert(!(process->pid == 432 &&
+ ltt_time_compare(process->creation_time,
+ ltt_time_zero)==0));
+
+ g_assert(!(process->pid == 432 &&
+ process->creation_time.tv_nsec == 47797905));
/* Process not present */
processlist_add(process_list,
pid_out,
}
}
}
+ } else if(strcmp(
+ ltt_eventtype_name(ltt_event_eventtype(e)),"process") == 0) {
+ /* We are in a fork or exit event */
+
+
}
&height,
&hashed_process_data_in) == 1)
{
+ g_assert(!(process_in->pid == 432 &&
+ ltt_time_compare(process_in->creation_time,
+ ltt_time_zero)==0));
+
+ g_assert(!(process_in->pid == 432 &&
+ process_in->creation_time.tv_nsec == 47797905));
+
/* Process not present */
processlist_add(process_list,
pid_in,
width,
&hashed_process_data_in->x);
}
+ } else if(strcmp(
+ ltt_eventtype_name(ltt_event_eventtype(e)),"process") == 0) {
+ /* We are in a fork or exit event */
+
+
}
+
return 0;
Drawing_t *drawing = control_flow_data->drawing;
GtkWidget *widget = drawing->drawing_area;
- drawing->damage_begin = 0;
- drawing->damage_end = drawing->width;
drawing_clear(control_flow_data->drawing);
processlist_clear(control_flow_data->process_list);
+ redraw_notify(control_flow_data, NULL);
+ request_background_data(control_flow_data);
+#if 0
+ drawing->damage_begin = 0;
+ drawing->damage_end = drawing->width;
if(drawing->damage_begin < drawing->damage_end)
{
drawing_data_request(drawing,
0,0,
drawing->width,
drawing->height);
-
- request_background_data(control_flow_data);
+#endif //0
return FALSE;
}
} ClosureData;
-/* find_process
- * Input : A trace and a PID.
- *
- * - For each CPU of the trace
- * - Search in trace states by PID and CPU key
- * - For each ProcessState found
- * - If state is not LTTV_STATE_WAIT
- * - Then this process state is the current one for this PID.
- * - Stop search.
- * - If no ProcessState found, return NULL.
- * - If all ProcessState were in LTTV_STATE_WAIT state, return one of
- * them arbitrarily.
- * Than means state is LTTV_STATE_WAIT, CPU unknown.
- */
-static LttvProcessState *find_process(LttvTraceState *tstate, guint pid)
-{
- guint cpu_num = ltt_trace_per_cpu_tracefile_number(tstate->parent.t);
- GQuark cpu_name;
- guint i;
-
- LttvProcessState *real_state = NULL;
-
- for(i=0;i<cpu_num;i++) {
- cpu_name = ((LttvTracefileState*)tstate->parent.tracefiles[i])->cpu_name;
- LttvProcessState *state = lttv_state_find_process_from_trace(tstate,
- cpu_name,
- pid);
-
- if(state != NULL) {
- real_state = state;
- if(state->state->s != LTTV_STATE_WAIT)
- break;
- }
- }
- return real_state;
-}
-
-
void draw_closure(gpointer key, gpointer value, gpointer user_data)
{
ProcessInfo *process_info = (ProcessInfo*)key;
* be added after the state update. */
g_assert(lttv_traceset_number(tsc->ts) > 0);
- LttvTraceState *trace_state =
- (LttvTraceState*)tsc->traces[process_info->trace_num];
+ /* tracefiles[0] is ok here, because we draw for every PID, and
+ * assume CPU 0 for PID 0 //FIXME */
+ LttvTracefileState *tfs =
+ (LttvTracefileState*)tsc->traces[process_info->trace_num]->tracefiles[0];
LttvProcessState *process;
- process = find_process(trace_state, process_info->pid);
+ process = lttv_state_find_process(tfs,
+ process_info->pid);
if(process != NULL) {