LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
* draw items from the beginning of the read for it. If it is not
* present, it's a new process and it was not present : it will
* be added after the state update. */
- LttvProcessState *process;
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ LttvProcessState *process = ts->running_process[cpu];
/* unknown state, bad current pid */
- if(tfs->process->pid != pid_out)
- process = lttv_state_find_process(tfs, pid_out);
- else
- process = tfs->process;
+ if(process->pid != pid_out)
+ process = lttv_state_find_process(ts, ANY_CPU, pid_out);
if(process != NULL) {
/* Well, the process_out existed : we must get it in the process hash
hashed_process_data = processlist_get_process_data(process_list,
pid_out,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(hashed_process_data == NULL)
processlist_add(process_list,
drawing,
pid_out,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
* present, it's a new process and it was not present : it will
* be added after the state update. */
LttvProcessState *process;
- process = lttv_state_find_process(tfs, pid_in);
+ process = lttv_state_find_process(ts, ANY_CPU, pid_in);
if(process != NULL) {
/* Well, the process_out existed : we must get it in the process hash
hashed_process_data = processlist_get_process_data(process_list,
pid_in,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(hashed_process_data == NULL)
processlist_add(process_list,
drawing,
pid_in,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
/* Find process pid_in in the list... */
- //process_in = lttv_state_find_process(tfs, pid_in);
- process_in = tfs->process;
+ //process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
+ //process_in = tfs->process;
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ process_in = ts->running_process[cpu];
/* It should exist, because we are after the state update. */
#ifdef EXTRA_CHECK
g_assert(process_in != NULL);
hashed_process_data_in = processlist_get_process_data(process_list,
pid_in,
- process_in->last_cpu_index,
+ process_in->cpu,
&birth,
tfc->t_context->index);
if(hashed_process_data_in == NULL)
processlist_add(process_list,
drawing,
pid_in,
- process_in->last_cpu_index,
+ process_in->cpu,
process_in->ppid,
&birth,
tfc->t_context->index,
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process_in->last_cpu_index] =
+ process_list->current_hash_data[process_in->cpu] =
hashed_process_data_in;
if(ltt_time_compare(hashed_process_data_in->next_good_time,
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
* time to do it.
*/
/* For the pid */
- LttvProcessState *process = tfs->process;
+ //LttvProcessState *process = tfs->process;
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ LttvProcessState *process = ts->running_process[cpu];
g_assert(process != NULL);
guint pid = process->pid;
ProcessList *process_list = control_flow_data->process_list;
LttTime birth = process->creation_time;
- if(likely(process_list->current_hash_data[ltt_tracefile_num(tfc->tf)] != NULL)) {
- hashed_process_data = process_list->current_hash_data[ltt_tracefile_num(tfc->tf)];
+ if(likely(process_list->current_hash_data[cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(unlikely(hashed_process_data == NULL))
processlist_add(process_list,
drawing,
pid,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
gtk_widget_queue_draw(drawing->drawing_area);
}
/* Set the current process */
- process_list->current_hash_data[process->last_cpu_index] =
+ process_list->current_hash_data[process->cpu] =
hashed_process_data;
}
* This function adds items to be drawn in a queue for each process.
*
*/
+#if 0
int after_execmode_hook(void *hook_data, void *call_data)
{
/**************** DOES NOTHING!! *************/
}
return 0;
}
-
+#endif //0
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
- LttvProcessState *process = tfs->process;
+ //LttvProcessState *process = tfs->process;
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ LttvProcessState *process = ts->running_process[cpu];
guint pid = process->pid;
LttTime birth;
guint pl_height = 0;
birth = process->creation_time;
- if(likely(process_list->current_hash_data[ltt_tracefile_num(tfc->tf)] != NULL)) {
- hashed_process_data = process_list->current_hash_data[ltt_tracefile_num(tfc->tf)];
+ if(likely(process_list->current_hash_data[cpu] != NULL)) {
+ hashed_process_data = process_list->current_hash_data[cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(unlikely(hashed_process_data == NULL))
processlist_add(process_list,
drawing,
pid,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
/* Don't care about the process if it's not in the state hash already :
* that means a process that has never done anything in the trace and
* unknown suddently gets destroyed : no state meaningful to show. */
- LttvProcessState *process = lttv_state_find_process(tfs, pid);
+ LttvProcessState *process = lttv_state_find_process(ts, ANY_CPU, pid);
if(process != NULL) {
LttTime birth;
* action done by the parent. */
hashed_process_data = processlist_get_process_data(process_list,
pid,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(unlikely(hashed_process_data == NULL))
processlist_add(process_list,
drawing,
pid,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
ProcessList *process_list = control_flow_data->process_list;
/* Find child in the list... */
- process_child = lttv_state_find_process(tfs, child_pid);
+ process_child = lttv_state_find_process(ts, ANY_CPU, child_pid);
/* It should exist, because we are after the state update. */
g_assert(process_child != NULL);
* on its child. */
hashed_process_data_child = processlist_get_process_data(process_list,
child_pid,
- process_child->last_cpu_index,
+ process_child->cpu,
&birth,
tfc->t_context->index);
if(likely(hashed_process_data_child == NULL))
processlist_add(process_list,
drawing,
child_pid,
- process_child->last_cpu_index,
+ process_child->cpu,
process_child->ppid,
&birth,
tfc->t_context->index,
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
+
LttEvent *e;
e = ltt_tracefile_get_event(tfc->tf);
LttTime evtime = ltt_event_time(e);
/* Add process to process list (if not present) */
- LttvProcessState *process = tfs->process;
+ //LttvProcessState *process = tfs->process;
+ guint cpu = ltt_tracefile_num(tfc->tf);
+ LttvProcessState *process = ts->running_process[cpu];
+
+ /* It should exist, because we are after the state update. */
+ g_assert(process != NULL);
+
guint pid = process->pid;
LttTime birth;
guint pl_height = 0;
ProcessList *process_list = control_flow_data->process_list;
- /* It should exist, because we are after the state update. */
- g_assert(process != NULL);
-
birth = process->creation_time;
- if(likely(process_list->current_hash_data[ltt_tracefile_num(tfc->tf)] != NULL) ){
- hashed_process_data = process_list->current_hash_data[ltt_tracefile_num(tfc->tf)];
+ if(likely(process_list->current_hash_data[cpu] != NULL) ){
+ hashed_process_data = process_list->current_hash_data[cpu];
} else {
hashed_process_data = processlist_get_process_data(process_list,
pid,
- process->last_cpu_index,
+ process->cpu,
&birth,
tfc->t_context->index);
if(unlikely(hashed_process_data == NULL))
processlist_add(process_list,
drawing,
pid,
- process->last_cpu_index,
+ process->cpu,
process->ppid,
&birth,
tfc->t_context->index,
}
/* Set the current process */
- process_list->current_hash_data[process->last_cpu_index] =
+ process_list->current_hash_data[process->cpu] =
hashed_process_data;
}
g_assert(lttv_traceset_number(tsc->ts) > 0);
#endif //EXTRA_CHECK
LttvTraceContext *tc = tsc->traces[process_info->trace_num];
+ LttvTraceState *ts = (LttvTraceState*)tc;
+#if 0
//FIXME : optimize data structures.
LttvTracefileState *tfs;
LttvTracefileContext *tfc;
}
g_assert(i<tc->tracefiles->len);
tfs = LTTV_TRACEFILE_STATE(tfc);
-
+#endif //0
// LttvTracefileState *tfs =
// (LttvTracefileState*)tsc->traces[process_info->trace_num]->
// tracefiles[process_info->cpu];
LttvProcessState *process;
- process = lttv_state_find_process(tfs,
+ process = lttv_state_find_process(ts, process_info->cpu,
process_info->pid);
if(unlikely(process != NULL)) {