X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Feventhooks.c;h=49a2109a98502dea28c2e46340d0e0d2d66ed6d7;hb=4e86ae2e22548733054ffe05644d4a66030c859e;hp=01a49c3b7ce8541aa6040c2016a9e5f1dded803f;hpb=b27439533c5620fe06b9800fce0bc3592ed2088b;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index 01a49c3b..49a2109a 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -428,6 +428,7 @@ int before_schedchange_hook(void *hook_data, void *call_data) * be added after the state update. */ LttvProcessState *process; process = lttv_state_find_process(tfs, pid_out); + //process = tfs->process; if(process != NULL) { /* Well, the process_out existed : we must get it in the process hash @@ -451,6 +452,7 @@ int before_schedchange_hook(void *hook_data, void *call_data) { g_assert(pid_out == 0 || pid_out != process->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, pid_out, process->last_cpu, @@ -459,15 +461,13 @@ int before_schedchange_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid_out, - process->last_cpu, - &birth, - tfc->t_context->index, + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, &y, - &height, - &hashed_process_data); + &height); drawing_insert_square( drawing, y, height); } @@ -596,6 +596,7 @@ int before_schedchange_hook(void *hook_data, void *call_data) { g_assert(pid_in == 0 || pid_in != process->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, pid_in, process->last_cpu, @@ -604,15 +605,13 @@ int before_schedchange_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid_in, - process->last_cpu, - &birth, - tfc->t_context->index, + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, &y, - &height, - &hashed_process_data); + &height); drawing_insert_square( drawing, y, height); } @@ -1399,6 +1398,7 @@ int after_schedchange_hook(void *hook_data, void *call_data) &hashed_process_data_in) == 1) { g_assert(pid_in == 0 || pid_in != process_in->ppid); + ProcessInfo *process_info; /* Process not present */ processlist_add(process_list, pid_in, @@ -1408,15 +1408,13 @@ int after_schedchange_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data_in); - processlist_get_process_pixels(process_list, - pid_in, - process_in->last_cpu, - &birth, - tfc->t_context->index, - &y_in, - &height, - &hashed_process_data_in); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data_in, + &y_in, + &height); drawing_insert_square( control_flow_data->drawing, y_in, height); } @@ -2003,6 +2001,7 @@ int before_execmode_hook(void *hook_data, void *call_data) &hashed_process_data) == 1) { g_assert(pid == 0 || pid != process->ppid); + ProcessInfo *process_info; /* Process not present */ processlist_add(process_list, pid, @@ -2012,15 +2011,13 @@ int before_execmode_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, + &y, + &height); drawing_insert_square( drawing, y, height); } @@ -2186,6 +2183,7 @@ int after_execmode_hook(void *hook_data, void *call_data) { g_assert(pid == 0 || pid != process->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, pid, process->last_cpu, @@ -2194,15 +2192,13 @@ int after_execmode_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, + &y, + &height); drawing_insert_square( control_flow_data->drawing, y, height); } @@ -2301,6 +2297,7 @@ int before_process_hook(void *hook_data, void *call_data) { g_assert(pid == 0 || pid != process->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, pid, process->last_cpu, @@ -2309,15 +2306,13 @@ int before_process_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, + &y, + &height); drawing_insert_square( control_flow_data->drawing, y, height); } @@ -2503,6 +2498,7 @@ int after_process_hook(void *hook_data, void *call_data) { g_assert(child_pid == 0 || child_pid != process_child->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, child_pid, process_child->last_cpu, @@ -2511,15 +2507,13 @@ int after_process_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data_child); - processlist_get_process_pixels(process_list, - child_pid, - process_child->last_cpu, - &birth, - tfc->t_context->index, - &y_child, - &height, - &hashed_process_data_child); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data_child, + &y_child, + &height); drawing_insert_square( control_flow_data->drawing, y_child, height); } @@ -2578,6 +2572,7 @@ int after_process_hook(void *hook_data, void *call_data) { g_assert(pid == 0 || pid != process->ppid); /* Process not present */ + ProcessInfo *process_info; processlist_add(process_list, pid, process->last_cpu, @@ -2586,15 +2581,13 @@ int after_process_hook(void *hook_data, void *call_data) tfc->t_context->index, name, &pl_height, + &process_info, &hashed_process_data); - processlist_get_process_pixels(process_list, - pid, - process->last_cpu, - &birth, - tfc->t_context->index, - &y, - &height, - &hashed_process_data); + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, + &y, + &height); drawing_insert_square( control_flow_data->drawing, y, height); } @@ -3085,14 +3078,11 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) const gchar *name = g_quark_to_string(process->name); /* process HAS to be present */ - g_assert(processlist_get_process_pixels(process_list, - process_info->pid, - process_info->cpu, - &birth, - process_info->trace_num, + processlist_get_pixels_from_data(process_list, + process_info, + hashed_process_data, &y, - &height, - &hashed_process_data) != 1); + &height); /* Now, the process is in the state hash and our own process hash. * We definitely can draw the items related to the ending state.