CFV-private.h attribute name change
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Event_Hooks.c
CommitLineData
f0d936c0 1/*****************************************************************************
2 * Hooks to be called by the main window *
3 *****************************************************************************/
4
f0d936c0 5
189a5d08 6#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
7#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
8
cf6cb7e0 9//#define PANGO_ENABLE_BACKEND
558aa013 10#include <gtk/gtk.h>
11#include <gdk/gdk.h>
5f16133f 12#include <glib.h>
80a52ff8 13#include <assert.h>
50439712 14#include <string.h>
5f16133f 15
cf6cb7e0 16//#include <pango/pango.h>
17
80a52ff8 18#include <ltt/event.h>
4ba42155 19#include <ltt/time.h>
50439712 20#include <ltt/type.h>
80a52ff8 21
558aa013 22#include <lttv/hook.h>
23#include <lttv/common.h>
80a52ff8 24#include <lttv/state.h>
1b238973 25#include <lttv/gtkTraceSet.h>
80a52ff8 26
f0d936c0 27
1ab818de 28#include "Event_Hooks.h"
f0d936c0 29#include "CFV.h"
5f16133f 30#include "Process_List.h"
1ab3d149 31#include "Drawing.h"
f7afe191 32#include "CFV-private.h"
5f16133f 33
80a52ff8 34
1a31868c 35#define MAX_PATH_LEN 256
36
f0d936c0 37
38/**
39 * Event Viewer's constructor hook
40 *
41 * This constructor is given as a parameter to the menuitem and toolbar button
42 * registration. It creates the list.
43 * @param pmParentWindow A pointer to the parent window.
44 * @return The widget created.
45 */
46GtkWidget *
4c69e0cc 47h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key)
f0d936c0 48{
a56a1ba4 49 g_info("h_guicontrolflow, %p, %p, %s", pmParentWindow, s, key);
50 ControlFlowData *Control_Flow_Data = guicontrolflow() ;
51
ba90bc77 52 Control_Flow_Data->mw = pmParentWindow;
a56a1ba4 53 TimeWindow *time_window = guicontrolflow_get_time_window(Control_Flow_Data);
54 time_window->start_time.tv_sec = 0;
55 time_window->start_time.tv_nsec = 0;
56 time_window->time_width.tv_sec = 0;
57 time_window->time_width.tv_nsec = 0;
58
59 LttTime *current_time = guicontrolflow_get_current_time(Control_Flow_Data);
60 current_time->tv_sec = 0;
61 current_time->tv_nsec = 0;
62
63 //g_critical("time width1 : %u",time_window->time_width);
64
65 get_time_window(pmParentWindow,
66 time_window);
67 get_current_time(pmParentWindow,
68 current_time);
69
70 //g_critical("time width2 : %u",time_window->time_width);
71 // Unreg done in the GuiControlFlow_Destructor
72 reg_update_time_window(update_time_window_hook, Control_Flow_Data,
73 pmParentWindow);
74 reg_update_current_time(update_current_time_hook, Control_Flow_Data,
75 pmParentWindow);
76 return guicontrolflow_get_widget(Control_Flow_Data) ;
77
f0d936c0 78}
79
3cff8cc1 80int event_selected_hook(void *hook_data, void *call_data)
f0d936c0 81{
a56a1ba4 82 ControlFlowData *Control_Flow_Data = (ControlFlowData*) hook_data;
83 guint *Event_Number = (guint*) call_data;
f0d936c0 84
a56a1ba4 85 g_critical("DEBUG : event selected by main window : %u", *Event_Number);
86
87// Control_Flow_Data->Currently_Selected_Event = *Event_Number;
88// Control_Flow_Data->Selected_Event = TRUE ;
89
90// tree_v_set_cursor(Control_Flow_Data);
f0d936c0 91
92}
93
f0d936c0 94/* Hook called before drawing. Gets the initial context at the beginning of the
95 * drawing interval and copy it to the context in Event_Request.
96 */
4c69e0cc 97int draw_before_hook(void *hook_data, void *call_data)
f0d936c0 98{
a56a1ba4 99 EventRequest *Event_Request = (EventRequest*)hook_data;
100 //EventsContext Events_Context = (EventsContext*)call_data;
101
102 //Event_Request->Events_Context = Events_Context;
f0d936c0 103
a56a1ba4 104 return 0;
f0d936c0 105}
106
107/*
108 * The draw event hook is called by the reading API to have a
109 * particular event drawn on the screen.
110 * @param hook_data ControlFlowData structure of the viewer.
111 * @param call_data Event context.
112 *
113 * This function basically draw lines and icons. Two types of lines are drawn :
114 * one small (3 pixels?) representing the state of the process and the second
115 * type is thicker (10 pixels?) representing on which CPU a process is running
116 * (and this only in running state).
117 *
118 * Extremums of the lines :
119 * x_min : time of the last event context for this process kept in memory.
120 * x_max : time of the current event.
121 * y : middle of the process in the process list. The process is found in the
122 * list, therefore is it's position in pixels.
123 *
124 * The choice of lines'color is defined by the context of the last event for this
125 * process.
126 */
4c69e0cc 127int draw_event_hook(void *hook_data, void *call_data)
f0d936c0 128{
a56a1ba4 129 EventRequest *Event_Request = (EventRequest*)hook_data;
130 ControlFlowData *control_flow_data = Event_Request->Control_Flow_Data;
e9a9c513 131
a56a1ba4 132 LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
e9a9c513 133
134 LttvTracefileState *tfs = (LttvTracefileState *)call_data;
135
a56a1ba4 136
e9a9c513 137 LttEvent *e;
e9a9c513 138 e = tfc->e;
139
a56a1ba4 140 if(strcmp(ltt_eventtype_name(ltt_event_eventtype(e)),"schedchange") == 0)
141 {
142 g_critical("schedchange!");
143
144 /* Add process to process list (if not present) and get drawing "y" from
145 * process position */
146 guint pid_out, pid_in;
147 LttvProcessState *process_out, *process_in;
148 LttTime birth;
149 guint y_in = 0, y_out = 0, height = 0, pl_height = 0;
150
151 ProcessList *process_list =
152 guicontrolflow_get_process_list(Event_Request->Control_Flow_Data);
153
154
155 LttField *f = ltt_event_field(e);
156 LttField *element;
157 element = ltt_field_member(f,0);
158 pid_out = ltt_event_get_long_unsigned(e,element);
159 element = ltt_field_member(f,1);
160 pid_in = ltt_event_get_long_unsigned(e,element);
161 g_critical("out : %u in : %u", pid_out, pid_in);
162
163
164 /* Find process pid_out in the list... */
165 process_out = lttv_state_find_process(tfs, pid_out);
166 g_critical("out : %s",g_quark_to_string(process_out->state->s));
167
168 birth = process_out->creation_time;
169 gchar *name = strdup(g_quark_to_string(process_out->name));
170 HashedProcessData *Hashed_Process_Data_out = NULL;
171
172 if(processlist_get_process_pixels(process_list,
173 pid_out,
174 &birth,
175 &y_out,
176 &height,
177 &Hashed_Process_Data_out) == 1)
178 {
179 /* Process not present */
180 processlist_add(process_list,
181 pid_out,
182 &birth,
183 name,
184 &pl_height,
185 &Hashed_Process_Data_out);
186 processlist_get_process_pixels(process_list,
187 pid_out,
188 &birth,
189 &y_out,
190 &height,
191 &Hashed_Process_Data_out);
192 drawing_insert_square( Event_Request->Control_Flow_Data->Drawing, y_out, height);
193 }
194
195 g_free(name);
196
197 /* Find process pid_in in the list... */
198 process_in = lttv_state_find_process(tfs, pid_in);
199 g_critical("in : %s",g_quark_to_string(process_in->state->s));
200
201 birth = process_in->creation_time;
202 name = strdup(g_quark_to_string(process_in->name));
203 HashedProcessData *Hashed_Process_Data_in = NULL;
204
205 if(processlist_get_process_pixels(process_list,
206 pid_in,
207 &birth,
208 &y_in,
209 &height,
210 &Hashed_Process_Data_in) == 1)
211 {
212 /* Process not present */
213 processlist_add(process_list,
214 pid_in,
215 &birth,
216 name,
217 &pl_height,
218 &Hashed_Process_Data_in);
219 processlist_get_process_pixels(process_list,
220 pid_in,
221 &birth,
222 &y_in,
223 &height,
224 &Hashed_Process_Data_in);
225
226 drawing_insert_square( Event_Request->Control_Flow_Data->Drawing, y_in, height);
227 }
228 g_free(name);
229
230
231 /* Find pixels corresponding to time of the event. If the time does
232 * not fit in the window, show a warning, not supposed to happend. */
233 guint x = 0;
234 guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width;
235
236 LttTime time = ltt_event_time(e);
237
ba90bc77 238 LttTime window_end = ltt_time_add(control_flow_data->time_window.time_width,
239 control_flow_data->time_window.start_time);
a56a1ba4 240
241
242 convert_time_to_pixels(
ba90bc77 243 control_flow_data->time_window.start_time,
a56a1ba4 244 window_end,
245 time,
246 width,
247 &x);
248
249 assert(x <= width);
250
251 /* draw what represents the event for outgoing process. */
252
253 DrawContext *draw_context_out = Hashed_Process_Data_out->draw_context;
254 draw_context_out->Current->modify_over->x = x;
255 draw_context_out->Current->modify_over->y = y_out;
256 draw_context_out->drawable = control_flow_data->Drawing->Pixmap;
257 draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout;
258 GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V;
259 //draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
260 draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
261 gdk_gc_copy(draw_context_out->gc, widget->style->black_gc);
262 //draw_context_out->gc = widget->style->black_gc;
263
264 //draw_arc((void*)&prop_arc, (void*)draw_context_out);
265 //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
266
267 GdkColor colorfg_out = { 0, 0xffff, 0x0000, 0x0000 };
268 GdkColor colorbg_out = { 0, 0xffff, 0xffff, 0xffff };
269 PropertiesText prop_text_out;
270 prop_text_out.foreground = &colorfg_out;
271 prop_text_out.background = &colorbg_out;
272 prop_text_out.size = 10;
273 prop_text_out.position = OVER;
274
275 /* Print status of the process : U, WF, WC, E, W, R */
276 if(process_out->state->s == LTTV_STATE_UNNAMED)
277 prop_text_out.Text = "U";
278 else if(process_out->state->s == LTTV_STATE_WAIT_FORK)
279 prop_text_out.Text = "WF";
280 else if(process_out->state->s == LTTV_STATE_WAIT_CPU)
281 prop_text_out.Text = "WC";
282 else if(process_out->state->s == LTTV_STATE_EXIT)
283 prop_text_out.Text = "E";
284 else if(process_out->state->s == LTTV_STATE_WAIT)
285 prop_text_out.Text = "W";
286 else if(process_out->state->s == LTTV_STATE_RUN)
287 prop_text_out.Text = "R";
288 else
289 prop_text_out.Text = "U";
290
291 draw_text((void*)&prop_text_out, (void*)draw_context_out);
292 gdk_gc_unref(draw_context_out->gc);
293
294 /* Draw the line of the out process */
295 if(draw_context_out->Previous->middle->x == -1)
296 {
297 draw_context_out->Previous->middle->x = Event_Request->x_begin;
298 g_critical("out middle x_beg : %u",Event_Request->x_begin);
299 }
300
301 draw_context_out->Current->middle->x = x;
302 draw_context_out->Current->middle->y = y_out + height/2;
303 draw_context_out->Previous->middle->y = y_out + height/2;
304 draw_context_out->drawable = control_flow_data->Drawing->Pixmap;
305 draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout;
306 //draw_context_out->gc = widget->style->black_gc;
307 draw_context_out->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
308 gdk_gc_copy(draw_context_out->gc, widget->style->black_gc);
309
310 PropertiesLine prop_line_out;
311 prop_line_out.color = g_new(GdkColor,1);
312 prop_line_out.line_width = 4;
313 prop_line_out.style = GDK_LINE_SOLID;
314 prop_line_out.position = MIDDLE;
315
316 /* color of line : status of the process */
317 if(process_out->state->s == LTTV_STATE_UNNAMED)
318 {
319 prop_line_out.color->red = 0x0000;
320 prop_line_out.color->green = 0x0000;
321 prop_line_out.color->blue = 0x0000;
322 }
323 else if(process_out->state->s == LTTV_STATE_WAIT_FORK)
324 {
325 prop_line_out.color->red = 0x0fff;
326 prop_line_out.color->green = 0x0000;
327 prop_line_out.color->blue = 0x0fff;
328 }
329 else if(process_out->state->s == LTTV_STATE_WAIT_CPU)
330 {
331 prop_line_out.color->red = 0x0fff;
332 prop_line_out.color->green = 0x0fff;
333 prop_line_out.color->blue = 0x0000;
334 }
335 else if(process_out->state->s == LTTV_STATE_EXIT)
336 {
337 prop_line_out.color->red = 0xffff;
338 prop_line_out.color->green = 0x0000;
339 prop_line_out.color->blue = 0xffff;
340 }
341 else if(process_out->state->s == LTTV_STATE_WAIT)
342 {
343 prop_line_out.color->red = 0xffff;
344 prop_line_out.color->green = 0x0000;
345 prop_line_out.color->blue = 0x0000;
346 }
347 else if(process_out->state->s == LTTV_STATE_RUN)
348 {
349 prop_line_out.color->red = 0x0000;
350 prop_line_out.color->green = 0xffff;
351 prop_line_out.color->blue = 0x0000;
352 }
353 else
354 {
355 prop_line_out.color->red = 0x0000;
356 prop_line_out.color->green = 0x0000;
357 prop_line_out.color->blue = 0x0000;
358 }
359
360 draw_line((void*)&prop_line_out, (void*)draw_context_out);
361 g_free(prop_line_out.color);
362 gdk_gc_unref(draw_context_out->gc);
363 /* Note : finishing line will have to be added when trace read over. */
364
365 /* Finally, update the drawing context of the pid_in. */
366
367 DrawContext *draw_context_in = Hashed_Process_Data_in->draw_context;
368 draw_context_in->Current->modify_over->x = x;
369 draw_context_in->Current->modify_over->y = y_in;
370 draw_context_in->drawable = control_flow_data->Drawing->Pixmap;
371 draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
372 widget = control_flow_data->Drawing->Drawing_Area_V;
373 //draw_context_in->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
374 //draw_context_in->gc = widget->style->black_gc;
375 draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
376 gdk_gc_copy(draw_context_in->gc, widget->style->black_gc);
377
378 //draw_arc((void*)&prop_arc, (void*)draw_context_in);
379 //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
380
381 GdkColor colorfg_in = { 0, 0x0000, 0xffff, 0x0000 };
382 GdkColor colorbg_in = { 0, 0xffff, 0xffff, 0xffff };
383 PropertiesText prop_text_in;
384 prop_text_in.foreground = &colorfg_in;
385 prop_text_in.background = &colorbg_in;
386 prop_text_in.size = 10;
387 prop_text_in.position = OVER;
388
389 /* Print status of the process : U, WF, WC, E, W, R */
390 if(process_in->state->s == LTTV_STATE_UNNAMED)
391 prop_text_in.Text = "U";
392 else if(process_in->state->s == LTTV_STATE_WAIT_FORK)
393 prop_text_in.Text = "WF";
394 else if(process_in->state->s == LTTV_STATE_WAIT_CPU)
395 prop_text_in.Text = "WC";
396 else if(process_in->state->s == LTTV_STATE_EXIT)
397 prop_text_in.Text = "E";
398 else if(process_in->state->s == LTTV_STATE_WAIT)
399 prop_text_in.Text = "W";
400 else if(process_in->state->s == LTTV_STATE_RUN)
401 prop_text_in.Text = "R";
402 else
403 prop_text_in.Text = "U";
404
405 draw_text((void*)&prop_text_in, (void*)draw_context_in);
406 gdk_gc_unref(draw_context_in->gc);
407
408 /* Draw the line of the in process */
409 if(draw_context_in->Previous->middle->x == -1)
410 {
411 draw_context_in->Previous->middle->x = Event_Request->x_begin;
412 g_critical("in middle x_beg : %u",Event_Request->x_begin);
413 }
414
415 draw_context_in->Current->middle->x = x;
416 draw_context_in->Previous->middle->y = y_in + height/2;
417 draw_context_in->Current->middle->y = y_in + height/2;
418 draw_context_in->drawable = control_flow_data->Drawing->Pixmap;
419 draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
420 //draw_context_in->gc = widget->style->black_gc;
421 draw_context_in->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
422 gdk_gc_copy(draw_context_in->gc, widget->style->black_gc);
423
424 PropertiesLine prop_line_in;
425 prop_line_in.color = g_new(GdkColor,1);
426 prop_line_in.line_width = 4;
427 prop_line_in.style = GDK_LINE_SOLID;
428 prop_line_in.position = MIDDLE;
429
430 /* color of line : status of the process */
431 if(process_in->state->s == LTTV_STATE_UNNAMED)
432 {
433 prop_line_in.color->red = 0x0000;
434 prop_line_in.color->green = 0x0000;
435 prop_line_in.color->blue = 0x0000;
436 }
437 else if(process_in->state->s == LTTV_STATE_WAIT_FORK)
438 {
439 prop_line_in.color->red = 0x0fff;
440 prop_line_in.color->green = 0x0000;
441 prop_line_in.color->blue = 0x0fff;
442 }
443 else if(process_in->state->s == LTTV_STATE_WAIT_CPU)
444 {
445 prop_line_in.color->red = 0x0fff;
446 prop_line_in.color->green = 0x0fff;
447 prop_line_in.color->blue = 0x0000;
448 }
449 else if(process_in->state->s == LTTV_STATE_EXIT)
450 {
451 prop_line_in.color->red = 0xffff;
452 prop_line_in.color->green = 0x0000;
453 prop_line_in.color->blue = 0xffff;
454 }
455 else if(process_in->state->s == LTTV_STATE_WAIT)
456 {
457 prop_line_in.color->red = 0xffff;
458 prop_line_in.color->green = 0x0000;
459 prop_line_in.color->blue = 0x0000;
460 }
461 else if(process_in->state->s == LTTV_STATE_RUN)
462 {
463 prop_line_in.color->red = 0x0000;
464 prop_line_in.color->green = 0xffff;
465 prop_line_in.color->blue = 0x0000;
466 }
467 else
468 {
469 prop_line_in.color->red = 0x0000;
470 prop_line_in.color->green = 0x0000;
471 prop_line_in.color->blue = 0x0000;
472 }
473
474 draw_line((void*)&prop_line_in, (void*)draw_context_in);
475 g_free(prop_line_in.color);
476 gdk_gc_unref(draw_context_in->gc);
477 }
478
479 return 0;
480
481 /* Temp dump */
80a52ff8 482#ifdef DONTSHOW
a56a1ba4 483 GString *string = g_string_new("");;
484 gboolean field_names = TRUE, state = TRUE;
80a52ff8 485
e9a9c513 486 lttv_event_to_string(e, tfc->tf, string, TRUE, field_names, tfs);
487 g_string_append_printf(string,"\n");
488
489 if(state) {
490 g_string_append_printf(string, " %s",
491 g_quark_to_string(tfs->process->state->s));
492 }
493
494 g_info("%s",string->str);
495
a56a1ba4 496 g_string_free(string, TRUE);
497
498 /* End of text dump */
80a52ff8 499#endif //DONTSHOW
50439712 500
f0d936c0 501}
502
503
4c69e0cc 504int draw_after_hook(void *hook_data, void *call_data)
f0d936c0 505{
a56a1ba4 506 EventRequest *Event_Request = (EventRequest*)hook_data;
507 ControlFlowData *control_flow_data = Event_Request->Control_Flow_Data;
50439712 508
a56a1ba4 509 LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
50439712 510
511 LttvTracefileState *tfs = (LttvTracefileState *)call_data;
512
a56a1ba4 513
50439712 514 LttEvent *e;
515 e = tfc->e;
516
a56a1ba4 517 if(strcmp(ltt_eventtype_name(ltt_event_eventtype(e)),"schedchange") == 0)
518 {
519 g_critical("schedchange!");
520
521 /* Add process to process list (if not present) and get drawing "y" from
522 * process position */
523 guint pid_out, pid_in;
524 LttvProcessState *process_out, *process_in;
525 LttTime birth;
526 guint y_in = 0, y_out = 0, height = 0, pl_height = 0;
527
528 ProcessList *process_list =
529 guicontrolflow_get_process_list(Event_Request->Control_Flow_Data);
530
531
532 LttField *f = ltt_event_field(e);
533 LttField *element;
534 element = ltt_field_member(f,0);
535 pid_out = ltt_event_get_long_unsigned(e,element);
536 element = ltt_field_member(f,1);
537 pid_in = ltt_event_get_long_unsigned(e,element);
538 g_critical("out : %u in : %u", pid_out, pid_in);
539
540
541 /* Find process pid_out in the list... */
542 process_out = lttv_state_find_process(tfs, pid_out);
543 g_critical("out : %s",g_quark_to_string(process_out->state->s));
544
545 birth = process_out->creation_time;
546 gchar *name = strdup(g_quark_to_string(process_out->name));
547 HashedProcessData *Hashed_Process_Data_out = NULL;
548
549 if(processlist_get_process_pixels(process_list,
550 pid_out,
551 &birth,
552 &y_out,
553 &height,
554 &Hashed_Process_Data_out) == 1)
555 {
556 /* Process not present */
557 processlist_add(process_list,
558 pid_out,
559 &birth,
560 name,
561 &pl_height,
562 &Hashed_Process_Data_out);
563 processlist_get_process_pixels(process_list,
564 pid_out,
565 &birth,
566 &y_out,
567 &height,
568 &Hashed_Process_Data_out);
569 drawing_insert_square( Event_Request->Control_Flow_Data->Drawing, y_out, height);
570 }
571
572 g_free(name);
573
574 /* Find process pid_in in the list... */
575 process_in = lttv_state_find_process(tfs, pid_in);
576 g_critical("in : %s",g_quark_to_string(process_in->state->s));
577
578 birth = process_in->creation_time;
579 name = strdup(g_quark_to_string(process_in->name));
580 HashedProcessData *Hashed_Process_Data_in = NULL;
581
582 if(processlist_get_process_pixels(process_list,
583 pid_in,
584 &birth,
585 &y_in,
586 &height,
587 &Hashed_Process_Data_in) == 1)
588 {
589 /* Process not present */
590 processlist_add(process_list,
591 pid_in,
592 &birth,
593 name,
594 &pl_height,
595 &Hashed_Process_Data_in);
596 processlist_get_process_pixels(process_list,
597 pid_in,
598 &birth,
599 &y_in,
600 &height,
601 &Hashed_Process_Data_in);
602
603 drawing_insert_square( Event_Request->Control_Flow_Data->Drawing, y_in, height);
604 }
605 g_free(name);
606
607
608 /* Find pixels corresponding to time of the event. If the time does
609 * not fit in the window, show a warning, not supposed to happend. */
610 //guint x = 0;
611 //guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width;
612
613 //LttTime time = ltt_event_time(e);
614
ba90bc77 615 //LttTime window_end = ltt_time_add(control_flow_data->time_window.time_width,
616 // control_flow_data->time_window.start_time);
a56a1ba4 617
618
619 //convert_time_to_pixels(
ba90bc77 620 // control_flow_data->time_window.start_time,
a56a1ba4 621 // window_end,
622 // time,
623 // width,
624 // &x);
625
626 //assert(x <= width);
627
628 /* draw what represents the event for outgoing process. */
629
630 DrawContext *draw_context_out = Hashed_Process_Data_out->draw_context;
631 //draw_context_out->Current->modify_over->x = x;
632 draw_context_out->Current->modify_over->y = y_out;
633 draw_context_out->drawable = control_flow_data->Drawing->Pixmap;
634 draw_context_out->pango_layout = control_flow_data->Drawing->pango_layout;
635 GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V;
636 //draw_context_out->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
637 draw_context_out->gc = widget->style->black_gc;
638
639 //draw_arc((void*)&prop_arc, (void*)draw_context_out);
640 //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
641
642 GdkColor colorfg_out = { 0, 0xffff, 0x0000, 0x0000 };
643 GdkColor colorbg_out = { 0, 0xffff, 0xffff, 0xffff };
644 PropertiesText prop_text_out;
645 prop_text_out.foreground = &colorfg_out;
646 prop_text_out.background = &colorbg_out;
647 prop_text_out.size = 10;
648 prop_text_out.position = OVER;
649
650 /* Print status of the process : U, WF, WC, E, W, R */
651 if(process_out->state->s == LTTV_STATE_UNNAMED)
652 prop_text_out.Text = "U";
653 else if(process_out->state->s == LTTV_STATE_WAIT_FORK)
654 prop_text_out.Text = "WF";
655 else if(process_out->state->s == LTTV_STATE_WAIT_CPU)
656 prop_text_out.Text = "WC";
657 else if(process_out->state->s == LTTV_STATE_EXIT)
658 prop_text_out.Text = "E";
659 else if(process_out->state->s == LTTV_STATE_WAIT)
660 prop_text_out.Text = "W";
661 else if(process_out->state->s == LTTV_STATE_RUN)
662 prop_text_out.Text = "R";
663 else
664 prop_text_out.Text = "U";
665
666 draw_text((void*)&prop_text_out, (void*)draw_context_out);
667
668 draw_context_out->Current->middle->y = y_out+height/2;
669 draw_context_out->Current->status = process_out->state->s;
670
671 /* for pid_out : remove Previous, Prev = Current, new Current (default) */
672 g_free(draw_context_out->Previous->modify_under);
673 g_free(draw_context_out->Previous->modify_middle);
674 g_free(draw_context_out->Previous->modify_over);
675 g_free(draw_context_out->Previous->under);
676 g_free(draw_context_out->Previous->middle);
677 g_free(draw_context_out->Previous->over);
678 g_free(draw_context_out->Previous);
679
680 draw_context_out->Previous = draw_context_out->Current;
681
682 draw_context_out->Current = g_new(DrawInfo,1);
683 draw_context_out->Current->over = g_new(ItemInfo,1);
684 draw_context_out->Current->over->x = -1;
685 draw_context_out->Current->over->y = -1;
686 draw_context_out->Current->middle = g_new(ItemInfo,1);
687 draw_context_out->Current->middle->x = -1;
688 draw_context_out->Current->middle->y = -1;
689 draw_context_out->Current->under = g_new(ItemInfo,1);
690 draw_context_out->Current->under->x = -1;
691 draw_context_out->Current->under->y = -1;
692 draw_context_out->Current->modify_over = g_new(ItemInfo,1);
693 draw_context_out->Current->modify_over->x = -1;
694 draw_context_out->Current->modify_over->y = -1;
695 draw_context_out->Current->modify_middle = g_new(ItemInfo,1);
696 draw_context_out->Current->modify_middle->x = -1;
697 draw_context_out->Current->modify_middle->y = -1;
698 draw_context_out->Current->modify_under = g_new(ItemInfo,1);
699 draw_context_out->Current->modify_under->x = -1;
700 draw_context_out->Current->modify_under->y = -1;
701 draw_context_out->Current->status = LTTV_STATE_UNNAMED;
702
703 /* Finally, update the drawing context of the pid_in. */
704
705 DrawContext *draw_context_in = Hashed_Process_Data_in->draw_context;
706 //draw_context_in->Current->modify_over->x = x;
707 draw_context_in->Current->modify_over->y = y_in;
708 draw_context_in->drawable = control_flow_data->Drawing->Pixmap;
709 draw_context_in->pango_layout = control_flow_data->Drawing->pango_layout;
710 widget = control_flow_data->Drawing->Drawing_Area_V;
711 //draw_context_in->gc = widget->style->fg_gc[GTK_WIDGET_STATE (widget)];
712 draw_context_in->gc = widget->style->black_gc;
713
714 //draw_arc((void*)&prop_arc, (void*)draw_context_in);
715 //test_draw_item(control_flow_data->Drawing, control_flow_data->Drawing->Pixmap);
716
717 GdkColor colorfg_in = { 0, 0x0000, 0xffff, 0x0000 };
718 GdkColor colorbg_in = { 0, 0xffff, 0xffff, 0xffff };
719 PropertiesText prop_text_in;
720 prop_text_in.foreground = &colorfg_in;
721 prop_text_in.background = &colorbg_in;
722 prop_text_in.size = 10;
723 prop_text_in.position = OVER;
724
725 /* Print status of the process : U, WF, WC, E, W, R */
726 if(process_in->state->s == LTTV_STATE_UNNAMED)
727 prop_text_in.Text = "U";
728 else if(process_in->state->s == LTTV_STATE_WAIT_FORK)
729 prop_text_in.Text = "WF";
730 else if(process_in->state->s == LTTV_STATE_WAIT_CPU)
731 prop_text_in.Text = "WC";
732 else if(process_in->state->s == LTTV_STATE_EXIT)
733 prop_text_in.Text = "E";
734 else if(process_in->state->s == LTTV_STATE_WAIT)
735 prop_text_in.Text = "W";
736 else if(process_in->state->s == LTTV_STATE_RUN)
737 prop_text_in.Text = "R";
738 else
739 prop_text_in.Text = "U";
740
741 draw_text((void*)&prop_text_in, (void*)draw_context_in);
742
743 draw_context_in->Current->middle->y = y_in+height/2;
744 draw_context_in->Current->status = process_in->state->s;
745
746 /* for pid_in : remove Previous, Prev = Current, new Current (default) */
747 g_free(draw_context_in->Previous->modify_under);
748 g_free(draw_context_in->Previous->modify_middle);
749 g_free(draw_context_in->Previous->modify_over);
750 g_free(draw_context_in->Previous->under);
751 g_free(draw_context_in->Previous->middle);
752 g_free(draw_context_in->Previous->over);
753 g_free(draw_context_in->Previous);
754
755 draw_context_in->Previous = draw_context_in->Current;
756
757 draw_context_in->Current = g_new(DrawInfo,1);
758 draw_context_in->Current->over = g_new(ItemInfo,1);
759 draw_context_in->Current->over->x = -1;
760 draw_context_in->Current->over->y = -1;
761 draw_context_in->Current->middle = g_new(ItemInfo,1);
762 draw_context_in->Current->middle->x = -1;
763 draw_context_in->Current->middle->y = -1;
764 draw_context_in->Current->under = g_new(ItemInfo,1);
765 draw_context_in->Current->under->x = -1;
766 draw_context_in->Current->under->y = -1;
767 draw_context_in->Current->modify_over = g_new(ItemInfo,1);
768 draw_context_in->Current->modify_over->x = -1;
769 draw_context_in->Current->modify_over->y = -1;
770 draw_context_in->Current->modify_middle = g_new(ItemInfo,1);
771 draw_context_in->Current->modify_middle->x = -1;
772 draw_context_in->Current->modify_middle->y = -1;
773 draw_context_in->Current->modify_under = g_new(ItemInfo,1);
774 draw_context_in->Current->modify_under->x = -1;
775 draw_context_in->Current->modify_under->y = -1;
776 draw_context_in->Current->status = LTTV_STATE_UNNAMED;
777
778 }
779
780 return 0;
f0d936c0 781}
f7afe191 782
783
784
785
1b238973 786gint update_time_window_hook(void *hook_data, void *call_data)
f7afe191 787{
a56a1ba4 788 ControlFlowData *control_flow_data = (ControlFlowData*) hook_data;
ba90bc77 789 TimeWindow *Old_time_window =
a56a1ba4 790 guicontrolflow_get_time_window(control_flow_data);
ba90bc77 791 TimeWindow *New_time_window = ((TimeWindow*)call_data);
a56a1ba4 792
793 /* Two cases : zoom in/out or scrolling */
794
795 /* In order to make sure we can reuse the old drawing, the scale must
796 * be the same and the new time interval being partly located in the
797 * currently shown time interval. (reuse is only for scrolling)
798 */
799
800 g_info("Old time window HOOK : %u, %u to %u, %u",
ba90bc77 801 Old_time_window->start_time.tv_sec,
802 Old_time_window->start_time.tv_nsec,
803 Old_time_window->time_width.tv_sec,
804 Old_time_window->time_width.tv_nsec);
a56a1ba4 805
806 g_info("New time window HOOK : %u, %u to %u, %u",
ba90bc77 807 New_time_window->start_time.tv_sec,
808 New_time_window->start_time.tv_nsec,
809 New_time_window->time_width.tv_sec,
810 New_time_window->time_width.tv_nsec);
a56a1ba4 811
ba90bc77 812 if( New_time_window->time_width.tv_sec == Old_time_window->time_width.tv_sec
813 && New_time_window->time_width.tv_nsec == Old_time_window->time_width.tv_nsec)
a56a1ba4 814 {
815 /* Same scale (scrolling) */
816 g_info("scrolling");
ba90bc77 817 LttTime *ns = &New_time_window->start_time;
818 LttTime *os = &Old_time_window->start_time;
819 LttTime old_end = ltt_time_add(Old_time_window->start_time,
820 Old_time_window->time_width);
821 LttTime new_end = ltt_time_add(New_time_window->start_time,
822 New_time_window->time_width);
a56a1ba4 823 //if(ns<os+w<ns+w)
824 //if(ns<os+w && os+w<ns+w)
825 //if(ns<old_end && os<ns)
826 if(ltt_time_compare(*ns, old_end) == -1
827 && ltt_time_compare(*os, *ns) == -1)
828 {
829 g_info("scrolling near right");
830 /* Scroll right, keep right part of the screen */
831 guint x = 0;
832 guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width;
833 convert_time_to_pixels(
834 *os,
835 old_end,
836 *ns,
837 width,
838 &x);
839
840 /* Copy old data to new location */
841 gdk_draw_drawable (control_flow_data->Drawing->Pixmap,
842 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
843 control_flow_data->Drawing->Pixmap,
844 x, 0,
845 0, 0,
846 -1, -1);
847
848 convert_time_to_pixels(
849 *ns,
850 new_end,
851 old_end,
852 width,
853 &x);
854
ba90bc77 855 *Old_time_window = *New_time_window;
a56a1ba4 856 /* Clear the data request background, but not SAFETY */
857 gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
858 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
859 TRUE,
860 x+SAFETY, 0,
861 control_flow_data->Drawing->width - x, // do not overlap
862 control_flow_data->Drawing->height+SAFETY);
863 /* Get new data for the rest. */
864 drawing_data_request(control_flow_data->Drawing,
865 &control_flow_data->Drawing->Pixmap,
866 x, 0,
867 control_flow_data->Drawing->width - x,
868 control_flow_data->Drawing->height);
869
870 drawing_refresh(control_flow_data->Drawing,
871 0, 0,
872 control_flow_data->Drawing->width,
873 control_flow_data->Drawing->height);
874
875
876 } else {
877 //if(ns<os<ns+w)
878 //if(ns<os && os<ns+w)
879 //if(ns<os && os<new_end)
880 if(ltt_time_compare(*ns,*os) == -1
881 && ltt_time_compare(*os,new_end) == -1)
882 {
883 g_info("scrolling near left");
884 /* Scroll left, keep left part of the screen */
885 guint x = 0;
886 guint width = control_flow_data->Drawing->Drawing_Area_V->allocation.width;
887 convert_time_to_pixels(
888 *ns,
889 new_end,
890 *os,
891 width,
892 &x);
893
894 /* Copy old data to new location */
895 gdk_draw_drawable (control_flow_data->Drawing->Pixmap,
896 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
897 control_flow_data->Drawing->Pixmap,
898 0, 0,
899 x, 0,
900 -1, -1);
901
ba90bc77 902 *Old_time_window = *New_time_window;
a56a1ba4 903
904 /* Clean the data request background */
905 gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
906 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
907 TRUE,
908 0, 0,
909 x, // do not overlap
910 control_flow_data->Drawing->height+SAFETY);
911 /* Get new data for the rest. */
912 drawing_data_request(control_flow_data->Drawing,
913 &control_flow_data->Drawing->Pixmap,
914 0, 0,
915 x,
916 control_flow_data->Drawing->height);
917
918 drawing_refresh(control_flow_data->Drawing,
919 0, 0,
920 control_flow_data->Drawing->width,
921 control_flow_data->Drawing->height);
922
923 } else {
924 g_info("scrolling far");
925 /* Cannot reuse any part of the screen : far jump */
ba90bc77 926 *Old_time_window = *New_time_window;
a56a1ba4 927
928
929 gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
930 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
931 TRUE,
932 0, 0,
933 control_flow_data->Drawing->width+SAFETY, // do not overlap
934 control_flow_data->Drawing->height+SAFETY);
935
936 drawing_data_request(control_flow_data->Drawing,
937 &control_flow_data->Drawing->Pixmap,
938 0, 0,
939 control_flow_data->Drawing->width,
940 control_flow_data->Drawing->height);
941
942 drawing_refresh(control_flow_data->Drawing,
943 0, 0,
944 control_flow_data->Drawing->width,
945 control_flow_data->Drawing->height);
946 }
947 }
948 } else {
949 /* Different scale (zoom) */
950 g_info("zoom");
951
ba90bc77 952 *Old_time_window = *New_time_window;
a56a1ba4 953
954 gdk_draw_rectangle (control_flow_data->Drawing->Pixmap,
955 control_flow_data->Drawing->Drawing_Area_V->style->white_gc,
956 TRUE,
957 0, 0,
958 control_flow_data->Drawing->width+SAFETY, // do not overlap
959 control_flow_data->Drawing->height+SAFETY);
960
961
962 drawing_data_request(control_flow_data->Drawing,
963 &control_flow_data->Drawing->Pixmap,
964 0, 0,
965 control_flow_data->Drawing->width,
966 control_flow_data->Drawing->height);
967
968 drawing_refresh(control_flow_data->Drawing,
969 0, 0,
970 control_flow_data->Drawing->width,
971 control_flow_data->Drawing->height);
972 }
973
974 return 0;
f7afe191 975}
976
1b238973 977gint update_current_time_hook(void *hook_data, void *call_data)
f7afe191 978{
a56a1ba4 979 ControlFlowData *control_flow_data = (ControlFlowData*) hook_data;
980
981 LttTime* current_time =
982 guicontrolflow_get_current_time(control_flow_data);
983 *current_time = *((LttTime*)call_data);
984
985 TimeWindow time_window;
986
ba90bc77 987 LttTime time_begin = control_flow_data->time_window.start_time;
988 LttTime width = control_flow_data->time_window.time_width;
a56a1ba4 989 LttTime half_width = ltt_time_div(width,2.0);
990 LttTime time_end = ltt_time_add(time_begin, width);
991
992 LttvTracesetContext * tsc =
ba90bc77 993 get_traceset_context(control_flow_data->mw);
a56a1ba4 994
995 LttTime trace_start = tsc->Time_Span->startTime;
996 LttTime trace_end = tsc->Time_Span->endTime;
997
998 g_info("New Current time HOOK : %u, %u", current_time->tv_sec,
999 current_time->tv_nsec);
1000
1001
1002
1003 /* If current time is inside time interval, just move the highlight
1004 * bar */
1005
1006 /* Else, we have to change the time interval. We have to tell it
1007 * to the main window. */
1008 /* The time interval change will take care of placing the current
1009 * time at the center of the visible area, or nearest possible if we are
1010 * at one end of the trace. */
1011
1012
1013 if(ltt_time_compare(*current_time, time_begin) == -1)
1014 {
1015 if(ltt_time_compare(*current_time,
1016 ltt_time_add(trace_start,half_width)) == -1)
1017 time_begin = trace_start;
1018 else
1019 time_begin = ltt_time_sub(*current_time,half_width);
1020
1021 time_window.start_time = time_begin;
1022 time_window.time_width = width;
1023
ba90bc77 1024 set_time_window(control_flow_data->mw, &time_window);
a56a1ba4 1025 }
1026 else if(ltt_time_compare(*current_time, time_end) == 1)
1027 {
1028 if(ltt_time_compare(*current_time, ltt_time_sub(trace_end, half_width)) == 1)
1029 time_begin = ltt_time_sub(trace_end,width);
1030 else
1031 time_begin = ltt_time_sub(*current_time,half_width);
1032
1033 time_window.start_time = time_begin;
1034 time_window.time_width = width;
1035
ba90bc77 1036 set_time_window(control_flow_data->mw, &time_window);
a56a1ba4 1037
1038 }
1039 gtk_widget_queue_draw(control_flow_data->Drawing->Drawing_Area_V);
1040
1041 return 0;
f7afe191 1042}
1043
8b90e648 1044typedef struct _ClosureData {
a56a1ba4 1045 EventRequest *event_request;
1046 LttvTraceState *ts;
8b90e648 1047} ClosureData;
a56a1ba4 1048
8b90e648 1049
1050void draw_closure(gpointer key, gpointer value, gpointer user_data)
1051{
a56a1ba4 1052 ProcessInfo *process_info = (ProcessInfo*)key;
1053 HashedProcessData *hashed_process_data = (HashedProcessData*)value;
1054 ClosureData *closure_data = (ClosureData*)user_data;
1055
1056 ControlFlowData *control_flow_data =
1057 closure_data->event_request->Control_Flow_Data;
1058
1059 GtkWidget *widget = control_flow_data->Drawing->Drawing_Area_V;
1060
1061 /* Get y position of process */
1062 gint y=0, height=0;
1063
ba90bc77 1064 processlist_get_pixels_from_data( control_flow_data->process_list,
a56a1ba4 1065 process_info,
1066 hashed_process_data,
1067 &y,
1068 &height);
1069 /* Get last state of process */
1070 LttvTraceContext *tc =
1071 (LttvTraceContext *)closure_data->ts;
8b90e648 1072
1073 LttvTraceState *ts = closure_data->ts;
a56a1ba4 1074 LttvProcessState *process;
1075
1076 process = lttv_state_find_process((LttvTracefileState*)ts, process_info->pid);
1077
1078 /* Draw the closing line */
1079 DrawContext *draw_context = hashed_process_data->draw_context;
1080 if(draw_context->Previous->middle->x == -1)
1081 {
1082 draw_context->Previous->middle->x = closure_data->event_request->x_begin;
1083 g_critical("out middle x_beg : %u",closure_data->event_request->x_begin);
1084 }
1085
1086 draw_context->Current->middle->x = closure_data->event_request->x_end;
1087 draw_context->Current->middle->y = y + height/2;
1088 draw_context->Previous->middle->y = y + height/2;
1089 draw_context->drawable = control_flow_data->Drawing->Pixmap;
1090 draw_context->pango_layout = control_flow_data->Drawing->pango_layout;
1091 //draw_context->gc = widget->style->black_gc;
1092 draw_context->gc = gdk_gc_new(control_flow_data->Drawing->Pixmap);
1093 gdk_gc_copy(draw_context->gc, widget->style->black_gc);
1094
1095 PropertiesLine prop_line;
1096 prop_line.color = g_new(GdkColor,1);
1097 prop_line.line_width = 6;
1098 prop_line.style = GDK_LINE_SOLID;
1099 prop_line.position = MIDDLE;
1100
1101 /* color of line : status of the process */
1102 if(process->state->s == LTTV_STATE_UNNAMED)
1103 {
1104 prop_line.color->red = 0x0000;
1105 prop_line.color->green = 0x0000;
1106 prop_line.color->blue = 0x0000;
1107 }
1108 else if(process->state->s == LTTV_STATE_WAIT_FORK)
1109 {
1110 prop_line.color->red = 0x0fff;
1111 prop_line.color->green = 0x0000;
1112 prop_line.color->blue = 0x0fff;
1113 }
1114 else if(process->state->s == LTTV_STATE_WAIT_CPU)
1115 {
1116 prop_line.color->red = 0x0fff;
1117 prop_line.color->green = 0x0fff;
1118 prop_line.color->blue = 0x0000;
1119 }
1120 else if(process->state->s == LTTV_STATE_EXIT)
1121 {
1122 prop_line.color->red = 0xffff;
1123 prop_line.color->green = 0x0000;
1124 prop_line.color->blue = 0xffff;
1125 }
1126 else if(process->state->s == LTTV_STATE_WAIT)
1127 {
1128 prop_line.color->red = 0xffff;
1129 prop_line.color->green = 0x0000;
1130 prop_line.color->blue = 0x0000;
1131 }
1132 else if(process->state->s == LTTV_STATE_RUN)
1133 {
1134 prop_line.color->red = 0x0000;
1135 prop_line.color->green = 0xffff;
1136 prop_line.color->blue = 0x0000;
1137 }
1138 else
1139 {
1140 prop_line.color->red = 0x0000;
1141 prop_line.color->green = 0x0000;
1142 prop_line.color->blue = 0x0000;
1143 }
1144
1145 draw_line((void*)&prop_line, (void*)draw_context);
1146 g_free(prop_line.color);
1147 gdk_gc_unref(draw_context->gc);
1148
1149 /* Reset draw_context of the process for next request */
1150
1151 hashed_process_data->draw_context->drawable = NULL;
1152 hashed_process_data->draw_context->gc = NULL;
1153 hashed_process_data->draw_context->pango_layout = NULL;
1154 hashed_process_data->draw_context->Current->over->x = -1;
1155 hashed_process_data->draw_context->Current->over->y = -1;
1156 hashed_process_data->draw_context->Current->middle->x = -1;
1157 hashed_process_data->draw_context->Current->middle->y = -1;
1158 hashed_process_data->draw_context->Current->under->x = -1;
1159 hashed_process_data->draw_context->Current->under->y = -1;
1160 hashed_process_data->draw_context->Current->modify_over->x = -1;
1161 hashed_process_data->draw_context->Current->modify_over->y = -1;
1162 hashed_process_data->draw_context->Current->modify_middle->x = -1;
1163 hashed_process_data->draw_context->Current->modify_middle->y = -1;
1164 hashed_process_data->draw_context->Current->modify_under->x = -1;
1165 hashed_process_data->draw_context->Current->modify_under->y = -1;
1166 hashed_process_data->draw_context->Current->status = LTTV_STATE_UNNAMED;
1167 hashed_process_data->draw_context->Previous->over->x = -1;
1168 hashed_process_data->draw_context->Previous->over->y = -1;
1169 hashed_process_data->draw_context->Previous->middle->x = -1;
1170 hashed_process_data->draw_context->Previous->middle->y = -1;
1171 hashed_process_data->draw_context->Previous->under->x = -1;
1172 hashed_process_data->draw_context->Previous->under->y = -1;
1173 hashed_process_data->draw_context->Previous->modify_over->x = -1;
1174 hashed_process_data->draw_context->Previous->modify_over->y = -1;
1175 hashed_process_data->draw_context->Previous->modify_middle->x = -1;
1176 hashed_process_data->draw_context->Previous->modify_middle->y = -1;
1177 hashed_process_data->draw_context->Previous->modify_under->x = -1;
1178 hashed_process_data->draw_context->Previous->modify_under->y = -1;
1179 hashed_process_data->draw_context->Previous->status = LTTV_STATE_UNNAMED;
1180
8b90e648 1181
1182}
1183
1184/*
1185 * for each process
a56a1ba4 1186 * draw closing line
1187 * new default prev and current
8b90e648 1188 */
1189int after_data_request(void *hook_data, void *call_data)
1190{
a56a1ba4 1191 EventRequest *Event_Request = (EventRequest*)hook_data;
1192 ControlFlowData *control_flow_data = Event_Request->Control_Flow_Data;
1193
1194 ProcessList *process_list =
1195 guicontrolflow_get_process_list(Event_Request->Control_Flow_Data);
1196
1197 ClosureData closure_data;
1198 closure_data.event_request = (EventRequest*)hook_data;
1199 closure_data.ts = (LttvTraceState*)call_data;
1200
1201 g_hash_table_foreach(process_list->Process_Hash, draw_closure,
1202 (void*)&closure_data);
1203
8b90e648 1204}
1205
This page took 0.07393 seconds and 4 git commands to generate.