From dd455fb8aa68172162fa7a44c534a405bccf1aa4 Mon Sep 17 00:00:00 2001 From: pmf Date: Wed, 10 Oct 2007 16:22:10 +0000 Subject: [PATCH] unfinished conversion of gui modules git-svn-id: http://ltt.polymtl.ca/svn@2619 04897980-b3bd-0310-b5e0-8ef037075253 --- .../lttv/modules/gui/controlflow/drawing.c | 58 ++++++++---------- .../lttv/modules/gui/controlflow/eventhooks.c | 59 +++++++++---------- .../lttv/modules/gui/detailedevents/events.c | 20 +------ .../gui/diskperformance/diskperformance.c | 2 - .../modules/gui/histogram/histoeventhooks.c | 1 - .../lttv/modules/gui/interrupts/interrupts.c | 2 - .../lttv/modules/gui/resourceview/drawing.c | 47 +++++++-------- .../modules/gui/resourceview/eventhooks.c | 41 +++++++------ .../lttv/modules/gui/statistics/statistics.c | 1 - .../poly/lttv/modules/gui/tutorial/tutorial.c | 2 - 10 files changed, 99 insertions(+), 134 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index e0b92aa3..83406014 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -175,7 +175,7 @@ void drawing_data_request(Drawing_t *drawing, LttvTraceHook *hook; - LttvTraceHookByFacility *thf; + LttvTraceHook *th; guint ret; gint before_hn, after_hn; @@ -226,7 +226,7 @@ void drawing_data_request(Drawing_t *drawing, /* before hooks */ ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY, + LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, before_execmode_hook, events_request, @@ -234,7 +234,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT, + LTT_EVENT_SYSCALL_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -242,7 +242,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_ENTRY, + LTT_EVENT_TRAP_ENTRY, LTT_FIELD_TRAP_ID, 0, 0, before_execmode_hook, events_request, @@ -250,7 +250,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT, + LTT_EVENT_TRAP_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -258,7 +258,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY, + LTT_EVENT_IRQ_ENTRY, LTT_FIELD_IRQ_ID, 0, 0, before_execmode_hook, events_request, @@ -266,7 +266,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_EXIT, + LTT_EVENT_IRQ_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -274,7 +274,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY, + LTT_EVENT_SOFT_IRQ_ENTRY, LTT_FIELD_SOFT_IRQ_ID, 0, 0, before_execmode_hook, events_request, @@ -282,7 +282,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT, + LTT_EVENT_SOFT_IRQ_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -291,7 +291,7 @@ void drawing_data_request(Drawing_t *drawing, ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE, + LTT_EVENT_SCHED_SCHEDULE, LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE, before_schedchange_hook, events_request, @@ -299,7 +299,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT, + LTT_EVENT_PROCESS_EXIT, LTT_FIELD_PID, 0, 0, before_process_exit_hook, events_request, @@ -307,7 +307,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FREE, + LTT_EVENT_PROCESS_FREE, LTT_FIELD_PID, 0, 0, before_process_release_hook, events_request, @@ -315,7 +315,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_LIST, LTT_EVENT_STATEDUMP_END, + LTT_EVENT_STATEDUMP_END, 0, 0, 0, before_statedump_end, events_request, @@ -374,7 +374,7 @@ void drawing_data_request(Drawing_t *drawing, after_hn = before_hn; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE, + LTT_EVENT_SCHED_SCHEDULE, LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE, after_schedchange_hook, events_request, @@ -382,7 +382,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FORK, + LTT_EVENT_PROCESS_FORK, LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0, after_process_fork_hook, events_request, @@ -390,7 +390,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT, + LTT_EVENT_PROCESS_EXIT, LTT_FIELD_PID, 0, 0, after_process_exit_hook, events_request, @@ -398,7 +398,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_FS, LTT_EVENT_EXEC, + LTT_EVENT_EXEC, 0, 0, 0, after_fs_exec_hook, events_request, @@ -406,7 +406,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_USER_GENERIC, LTT_EVENT_THREAD_BRAND, + LTT_EVENT_THREAD_BRAND, LTT_FIELD_NAME, 0, 0, after_user_generic_thread_brand_hook, events_request, @@ -414,7 +414,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_LIST, LTT_EVENT_PROCESS_STATE, + LTT_EVENT_PROCESS_STATE, LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME, after_event_enum_process_hook, events_request, @@ -436,26 +436,18 @@ void drawing_data_request(Drawing_t *drawing, /* Add these hooks to each event_by_id hooks list */ /* add before */ for(k = 0 ; k < before_hn ; k++) { - hook = &g_array_index(hooks, LttvTraceHook, k); - for(l=0;lfac_list->len;l++) { - thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l); - lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id), - thf->h, - thf, + lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, th->id), + th->h, + th, LTTV_PRIO_STATE-5); - } } /* add after */ for(k = before_hn ; k < after_hn ; k++) { - hook = &g_array_index(hooks, LttvTraceHook, k); - for(l=0;lfac_list->len;l++) { - thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l); - lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id), - thf->h, - thf, + lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, th->id), + th->h, + th, LTTV_PRIO_STATE+5); - } } events_request->hooks = hooks; diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index e87f7edb..53d3a883 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -61,7 +61,6 @@ #include #include -#include #include #include @@ -339,8 +338,8 @@ static inline PropertiesLine prepare_s_e_line(LttvProcessState *process) int before_schedchange_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -363,8 +362,8 @@ int before_schedchange_hook(void *hook_data, void *call_data) guint pid_out; guint pid_in; { - pid_out = ltt_event_get_long_unsigned(e, thf->f1); - pid_in = ltt_event_get_long_unsigned(e, thf->f2); + pid_out = ltt_event_get_long_unsigned(e, th->f1); + pid_in = ltt_event_get_long_unsigned(e, th->f2); } tfc->target_pid = pid_out; @@ -738,8 +737,8 @@ int before_schedchange_hook(void *hook_data, void *call_data) */ int after_schedchange_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -770,8 +769,8 @@ int after_schedchange_hook(void *hook_data, void *call_data) guint pid_in; { guint pid_out; - pid_out = ltt_event_get_long_unsigned(e, thf->f1); - pid_in = ltt_event_get_long_unsigned(e, thf->f2); + pid_out = ltt_event_get_long_unsigned(e, th->f1); + pid_in = ltt_event_get_long_unsigned(e, th->f2); } @@ -873,8 +872,8 @@ int after_schedchange_hook(void *hook_data, void *call_data) int before_execmode_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1076,8 +1075,8 @@ int before_execmode_hook(void *hook_data, void *call_data) int before_process_exit_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; @@ -1274,8 +1273,8 @@ int before_process_exit_hook(void *hook_data, void *call_data) int before_process_release_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; @@ -1300,7 +1299,7 @@ int before_process_release_hook(void *hook_data, void *call_data) guint pid; { - pid = ltt_event_get_long_unsigned(e, thf->f1); + pid = ltt_event_get_long_unsigned(e, th->f1); } /* Add process to process list (if not present) */ @@ -1477,8 +1476,8 @@ int before_process_release_hook(void *hook_data, void *call_data) */ int after_process_fork_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1500,7 +1499,7 @@ int after_process_fork_hook(void *hook_data, void *call_data) guint child_pid; { - child_pid = ltt_event_get_long_unsigned(e, thf->f2); + child_pid = ltt_event_get_long_unsigned(e, th->f2); } /* Add process to process list (if not present) */ @@ -1611,8 +1610,8 @@ int after_process_fork_hook(void *hook_data, void *call_data) */ int after_process_exit_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1721,8 +1720,8 @@ int after_process_exit_hook(void *hook_data, void *call_data) /* Get the filename of the process to print */ int after_fs_exec_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1802,8 +1801,8 @@ int after_fs_exec_hook(void *hook_data, void *call_data) /* Get the filename of the process to print */ int after_user_generic_thread_brand_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1894,8 +1893,8 @@ int after_user_generic_thread_brand_hook(void *hook_data, void *call_data) */ int after_event_enum_process_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1928,7 +1927,7 @@ int after_event_enum_process_hook(void *hook_data, void *call_data) guint pid_in; { - pid_in = ltt_event_get_long_unsigned(e, thf->f1); + pid_in = ltt_event_get_long_unsigned(e, th->f1); } if(pid_in == 0) { @@ -2704,8 +2703,8 @@ int after_chunk(void *hook_data, void *call_data) */ int before_statedump_end(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; diff --git a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c index 0121d931..5c8456f9 100644 --- a/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c +++ b/ltt/branches/poly/lttv/modules/gui/detailedevents/events.c @@ -54,9 +54,7 @@ #include #include -#include #include -#include #include #include #include @@ -147,7 +145,6 @@ enum TRACEFILE_NAME_COLUMN, CPUID_COLUMN, EVENT_COLUMN, - FACILITY_COLUMN, TIME_S_COLUMN, TIME_NS_COLUMN, PID_COLUMN, @@ -347,16 +344,6 @@ gui_events(LttvPluginTab *ptab) gtk_tree_view_append_column (GTK_TREE_VIEW (event_viewer_data->tree_v), column); - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes ("Facility", - renderer, - "text", FACILITY_COLUMN, - NULL); - gtk_tree_view_column_set_alignment (column, 0.0); - gtk_tree_view_column_set_fixed_width (column, 120); - gtk_tree_view_append_column (GTK_TREE_VIEW (event_viewer_data->tree_v), - column); - renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Time (s)", renderer, @@ -1581,8 +1568,8 @@ int event_hook(void *hook_data, void *call_data) return FALSE; - LttFacility *facility = ltt_event_facility(e); - LttEventType *event_type = ltt_event_eventtype(e); +// LttFacility *facility = ltt_event_facility(e); +// LttEventType *event_type = ltt_event_eventtype(e); LttTime time = ltt_event_time(e); guint cpu = tfs->cpu; @@ -1607,8 +1594,7 @@ int event_hook(void *hook_data, void *call_data) TRACE_NAME_COLUMN, g_quark_to_string(ltt_trace_name(tfc->t_context->t)), TRACEFILE_NAME_COLUMN, g_quark_to_string(ltt_tracefile_name(tfc->tf)), CPUID_COLUMN, cpu, - FACILITY_COLUMN, g_quark_to_string(ltt_facility_name(facility)), - EVENT_COLUMN, g_quark_to_string(ltt_eventtype_name(event_type)), + EVENT_COLUMN, g_quark_to_string(marker_get_info_from_id(tfc->tf->trace, e->event_id)->name), TIME_S_COLUMN, time.tv_sec, TIME_NS_COLUMN, time.tv_nsec, PID_COLUMN, process->pid, diff --git a/ltt/branches/poly/lttv/modules/gui/diskperformance/diskperformance.c b/ltt/branches/poly/lttv/modules/gui/diskperformance/diskperformance.c index af56e9bb..d09da7e6 100644 --- a/ltt/branches/poly/lttv/modules/gui/diskperformance/diskperformance.c +++ b/ltt/branches/poly/lttv/modules/gui/diskperformance/diskperformance.c @@ -27,9 +27,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/ltt/branches/poly/lttv/modules/gui/histogram/histoeventhooks.c b/ltt/branches/poly/lttv/modules/gui/histogram/histoeventhooks.c index 28d83583..f0a61ca4 100644 --- a/ltt/branches/poly/lttv/modules/gui/histogram/histoeventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/histogram/histoeventhooks.c @@ -61,7 +61,6 @@ #include #include -#include #include #include diff --git a/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c b/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c index 03576713..131faef3 100644 --- a/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c +++ b/ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c @@ -73,9 +73,7 @@ Xa: Frequency (Hz) #include #include #include -#include #include -#include #include #include #include diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c index 83311b5e..a03809c6 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c @@ -184,7 +184,7 @@ void drawing_data_request(Drawing_t *drawing, LttvTraceHook *hook; - LttvTraceHookByFacility *thf; + LttvTraceHook *th; guint ret; gint before_hn, after_hn; @@ -235,7 +235,7 @@ void drawing_data_request(Drawing_t *drawing, /* before hooks */ // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY, +// LTT_EVENT_SYSCALL_ENTRY, // LTT_FIELD_SYSCALL_ID, 0, 0, // before_execmode_hook, // events_request, @@ -243,7 +243,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT, +// LTT_EVENT_SYSCALL_EXIT, // 0, 0, 0, // before_execmode_hook, // events_request, @@ -251,7 +251,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; // ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_ENTRY, + LTT_EVENT_TRAP_ENTRY, LTT_FIELD_TRAP_ID, 0, 0, before_execmode_hook, events_request, @@ -259,7 +259,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT, + LTT_EVENT_TRAP_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -267,7 +267,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY, + LTT_EVENT_IRQ_ENTRY, LTT_FIELD_IRQ_ID, 0, 0, before_execmode_hook, events_request, @@ -275,7 +275,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_EXIT, + LTT_EVENT_IRQ_EXIT, 0, 0, 0, before_execmode_hook, events_request, @@ -283,7 +283,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY, +// LTT_EVENT_SOFT_IRQ_ENTRY, // LTT_FIELD_SOFT_IRQ_ID, 0, 0, // before_execmode_hook, // events_request, @@ -291,7 +291,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT, +// LTT_EVENT_SOFT_IRQ_EXIT, // 0, 0, 0, // before_execmode_hook, // events_request, @@ -300,7 +300,7 @@ void drawing_data_request(Drawing_t *drawing, ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE, + LTT_EVENT_SCHED_SCHEDULE, LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE, before_schedchange_hook, events_request, @@ -308,7 +308,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT, +// LTT_EVENT_PROCESS_EXIT, // LTT_FIELD_PID, 0, 0, // before_process_exit_hook, // events_request, @@ -316,7 +316,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FREE, +// LTT_EVENT_PROCESS_FREE, // LTT_FIELD_PID, 0, 0, // before_process_release_hook, // events_request, @@ -324,7 +324,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_LIST, LTT_EVENT_STATEDUMP_END, +// LTT_EVENT_STATEDUMP_END, // 0, 0, 0, // before_statedump_end, // events_request, @@ -332,7 +332,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_ISSUE, + LTT_EVENT_REQUEST_ISSUE, LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION, before_bdev_event_hook, events_request, @@ -340,7 +340,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) before_hn--; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_COMPLETE, + LTT_EVENT_REQUEST_COMPLETE, LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION, before_bdev_event_hook, events_request, @@ -399,7 +399,7 @@ void drawing_data_request(Drawing_t *drawing, after_hn = before_hn; ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE, + LTT_EVENT_SCHED_SCHEDULE, LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE, after_schedchange_hook, events_request, @@ -407,7 +407,7 @@ void drawing_data_request(Drawing_t *drawing, if(ret) after_hn--; // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FORK, +// LTT_EVENT_PROCESS_FORK, // LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0, // after_process_fork_hook, // events_request, @@ -415,7 +415,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) after_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT, +// LTT_EVENT_PROCESS_EXIT, // LTT_FIELD_PID, 0, 0, // after_process_exit_hook, // events_request, @@ -423,7 +423,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) after_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_FS, LTT_EVENT_EXEC, +// LTT_EVENT_EXEC, // 0, 0, 0, // after_fs_exec_hook, // events_request, @@ -431,7 +431,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) after_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_USER_GENERIC, LTT_EVENT_THREAD_BRAND, +// LTT_EVENT_THREAD_BRAND, // LTT_FIELD_NAME, 0, 0, // after_user_generic_thread_brand_hook, // events_request, @@ -439,7 +439,7 @@ void drawing_data_request(Drawing_t *drawing, // if(ret) after_hn--; // // ret = lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_LIST, LTT_EVENT_PROCESS_STATE, +// LTT_EVENT_PROCESS_STATE, // LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME, // after_event_enum_process_hook, // events_request, @@ -462,13 +462,10 @@ void drawing_data_request(Drawing_t *drawing, /* add before */ for(k = 0 ; k < before_hn ; k++) { hook = &g_array_index(hooks, LttvTraceHook, k); - for(l=0;lfac_list->len;l++) { - thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l); - lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id), + lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id), thf->h, thf, LTTV_PRIO_STATE-5); - } } /* add after */ diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c index 432931c8..945cc622 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c @@ -61,7 +61,6 @@ #include #include -#include #include #include @@ -403,8 +402,8 @@ static void bdev_set_line_color(PropertiesLine *prop_line, LttvBdevState *s) int before_schedchange_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -428,8 +427,8 @@ int before_schedchange_hook(void *hook_data, void *call_data) guint pid_out; guint pid_in; - pid_out = ltt_event_get_long_unsigned(e, thf->f1); - pid_in = ltt_event_get_long_unsigned(e, thf->f2); + pid_out = ltt_event_get_long_unsigned(e, th->f1); + pid_in = ltt_event_get_long_unsigned(e, th->f2); // if(pid_in != 0 && pid_out != 0) { // /* not a transition to/from idle */ // return 0; @@ -815,8 +814,8 @@ int before_schedchange_hook(void *hook_data, void *call_data) */ int after_schedchange_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -849,8 +848,8 @@ int after_schedchange_hook(void *hook_data, void *call_data) guint pid_in; { guint pid_out; - pid_out = ltt_event_get_long_unsigned(e, thf->f1); - pid_in = ltt_event_get_long_unsigned(e, thf->f2); + pid_out = ltt_event_get_long_unsigned(e, th->f1); + pid_in = ltt_event_get_long_unsigned(e, th->f2); } @@ -951,8 +950,8 @@ int after_schedchange_hook(void *hook_data, void *call_data) int before_execmode_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1147,8 +1146,8 @@ int before_execmode_hook(void *hook_data, void *call_data) int before_execmode_hook_irq(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1179,7 +1178,7 @@ int before_execmode_hook_irq(void *hook_data, void *call_data) guint8 ev_id_exit = ltt_eventtype_id(ltt_facility_eventtype_get_by_name(ev_facility, LTT_EVENT_IRQ_EXIT)); if(ltt_facility_name(ev_facility) == LTT_FACILITY_KERNEL && ev_id_entry == ltt_event_eventtype_id(e)) { - irq = ltt_event_get_long_unsigned(e, thf->f1); + irq = ltt_event_get_long_unsigned(e, th->f1); } else if(ltt_facility_name(ev_facility) == LTT_FACILITY_KERNEL && ev_id_exit == ltt_event_eventtype_id(e)) { @@ -1358,8 +1357,8 @@ int before_execmode_hook_irq(void *hook_data, void *call_data) int before_bdev_event_hook(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; @@ -1381,9 +1380,9 @@ int before_bdev_event_hook(void *hook_data, void *call_data) /* For the pid */ guint cpu = tfs->cpu; - guint8 major = ltt_event_get_long_unsigned(e, thf->f1); - guint8 minor = ltt_event_get_long_unsigned(e, thf->f2); - guint oper = ltt_event_get_long_unsigned(e, thf->f3); + guint8 major = ltt_event_get_long_unsigned(e, th->f1); + guint8 minor = ltt_event_get_long_unsigned(e, th->f2); + guint oper = ltt_event_get_long_unsigned(e, th->f3); gint devcode_gint = MKDEV(major,minor); { @@ -2282,8 +2281,8 @@ int after_chunk(void *hook_data, void *call_data) */ int before_statedump_end(void *hook_data, void *call_data) { - LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data; - EventsRequest *events_request = (EventsRequest*)thf->hook_data; + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; ControlFlowData *control_flow_data = events_request->viewer_data; LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; diff --git a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c index c93a7c3c..3f5c51d5 100644 --- a/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c +++ b/ltt/branches/poly/lttv/modules/gui/statistics/statistics.c @@ -27,7 +27,6 @@ #include #include -#include #include #include diff --git a/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c b/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c index 46ab96aa..4f786f30 100644 --- a/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c +++ b/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c @@ -43,9 +43,7 @@ #include #include #include -#include #include -#include #include #include #include -- 2.34.1