From: compudj Date: Fri, 30 Jan 2004 13:49:52 +0000 (+0000) Subject: cpu number for running processes X-Git-Tag: v0.12.20~3033 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=319e9d81af5c62d9bfae5a228e9158385c6309a9;p=lttv.git cpu number for running processes git-svn-id: http://ltt.polymtl.ca/svn@456 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index 2f44a0cf..0f27942b 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -31,6 +31,7 @@ #include #include #include +#include //#include @@ -271,7 +272,9 @@ int draw_event_hook(void *hook_data, void *call_data) DrawContext *draw_context_out = hashed_process_data_out->draw_context; draw_context_out->current->modify_over->x = x; + draw_context_out->current->modify_under->x = x; draw_context_out->current->modify_over->y = y_out; + draw_context_out->current->modify_under->y = y_out+(height/2)+2; draw_context_out->drawable = control_flow_data->drawing->pixmap; draw_context_out->pango_layout = control_flow_data->drawing->pango_layout; GtkWidget *widget = control_flow_data->drawing->drawing_area; @@ -429,7 +432,9 @@ int draw_event_hook(void *hook_data, void *call_data) DrawContext *draw_context_in = hashed_process_data_in->draw_context; draw_context_in->current->modify_over->x = x; + draw_context_in->current->modify_under->x = x; draw_context_in->current->modify_over->y = y_in; + draw_context_in->current->modify_under->y = y_in+(height/2)+2; draw_context_in->drawable = control_flow_data->drawing->pixmap; draw_context_in->pango_layout = control_flow_data->drawing->pango_layout; widget = control_flow_data->drawing->drawing_area; @@ -739,6 +744,7 @@ int draw_after_hook(void *hook_data, void *call_data) DrawContext *draw_context_out = hashed_process_data_out->draw_context; //draw_context_out->current->modify_over->x = x; draw_context_out->current->modify_over->y = y_out; + draw_context_out->current->modify_under->y = y_out+(height/2)+2; draw_context_out->drawable = control_flow_data->drawing->pixmap; draw_context_out->pango_layout = control_flow_data->drawing->pango_layout; GtkWidget *widget = control_flow_data->drawing->drawing_area; @@ -817,7 +823,7 @@ int draw_after_hook(void *hook_data, void *call_data) prop_text_out.text = "U"; draw_text((void*)&prop_text_out, (void*)draw_context_out); - + draw_context_out->current->middle->y = y_out+height/2; draw_context_out->current->status = process_out->state->s; @@ -858,6 +864,7 @@ int draw_after_hook(void *hook_data, void *call_data) DrawContext *draw_context_in = hashed_process_data_in->draw_context; //draw_context_in->current->modify_over->x = x; draw_context_in->current->modify_over->y = y_in; + draw_context_in->current->modify_under->y = y_in+(height/2)+2; draw_context_in->drawable = control_flow_data->drawing->pixmap; draw_context_in->pango_layout = control_flow_data->drawing->pango_layout; widget = control_flow_data->drawing->drawing_area; @@ -938,6 +945,27 @@ int draw_after_hook(void *hook_data, void *call_data) draw_text((void*)&prop_text_in, (void*)draw_context_in); + if(process_in->state->s == LTTV_STATE_RUN) + { + gchar tmp[255]; + prop_text_in.foreground = &colorfg_in; + prop_text_in.background = &colorbg_in; + prop_text_in.foreground->red = 0xffff; + prop_text_in.foreground->green = 0xffff; + prop_text_in.foreground->blue = 0xffff; + prop_text_in.size = 6; + prop_text_in.position = UNDER; + + prop_text_in.text = g_new(gchar, 260); + strcpy(prop_text_in.text, "CPU "); + snprintf(tmp, 255, "%u", tfc->index); + strcat(prop_text_in.text, tmp); + + draw_text((void*)&prop_text_in, (void*)draw_context_in); + g_free(prop_text_in.text); + } + + draw_context_in->current->middle->y = y_in+height/2; draw_context_in->current->status = process_in->state->s;