unfinished conversion of gui modules
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 10 Oct 2007 16:22:10 +0000 (16:22 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 10 Oct 2007 16:22:10 +0000 (16:22 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2619 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c
ltt/branches/poly/lttv/modules/gui/diskperformance/diskperformance.c
ltt/branches/poly/lttv/modules/gui/histogram/histoeventhooks.c
ltt/branches/poly/lttv/modules/gui/interrupts/interrupts.c
ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c
ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c
ltt/branches/poly/lttv/modules/gui/statistics/statistics.c
ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c

index e0b92aa3fc526ec49bba9444916e68139249d64e..83406014bc2431c416865dc80cdff0bf90f0db7a 100644 (file)
@@ -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;l<hook->fac_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;l<hook->fac_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;
index e87f7edbabd02b7a6c74b24710ca0295cd5cc138..53d3a8834681d7a5615662bbf6bbc34c1c5ef8bb 100644 (file)
@@ -61,7 +61,6 @@
 
 #include <ltt/event.h>
 #include <ltt/time.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
 
 #include <lttv/lttv.h>
@@ -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;
index 0121d931dfdc71ffc292797f1a786e3c86a6401a..5c8456f9eb8d6e6828935975b9236276e861a5ff 100644 (file)
@@ -54,9 +54,7 @@
 
 #include <ltt/ltt.h>
 #include <ltt/event.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
-#include <ltt/facility.h>
 #include <lttv/module.h>
 #include <lttv/hook.h>
 #include <lttv/tracecontext.h>
@@ -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,
index af56e9bb39e4d216997435ac299e6b6cebf4a09e..d09da7e65daa55b06a686edd3f19c24decd76b1a 100644 (file)
@@ -27,9 +27,7 @@
 #include <string.h>
 #include <ltt/ltt.h>
 #include <ltt/event.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
-#include <ltt/facility.h>
 #include <lttv/module.h>
 #include <lttv/hook.h>
 #include <lttv/tracecontext.h>
index 28d83583f0b651b3add57bfa363e4db853555694..f0a61ca4794cd4af941d50037747965a10f70feb 100644 (file)
@@ -61,7 +61,6 @@
 
 #include <ltt/event.h>
 #include <ltt/time.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
 
 #include <lttv/lttv.h>
index 035767136a969cee86693e6fa76355bf9dc7949c..131faef3bc1400a5ebd78a3ce796b36d861d1bb4 100644 (file)
@@ -73,9 +73,7 @@ Xa: Frequency  (Hz)
 #include <string.h>
 #include <ltt/ltt.h>
 #include <ltt/event.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
-#include <ltt/facility.h>
 #include <lttv/module.h>
 #include <lttv/hook.h>
 #include <lttv/tracecontext.h>
index 83311b5eeb6fcdb595f53a81c8f352c2915bbf4b..a03809c698755672eeadd887776d20702267b212 100644 (file)
@@ -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;l<hook->fac_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 */
index 432931c8f7bf2bd5679c10d31ec296474f97d429..945cc62221ca085df25164fee826a83820440381 100644 (file)
@@ -61,7 +61,6 @@
 
 #include <ltt/event.h>
 #include <ltt/time.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
 
 #include <lttv/lttv.h>
@@ -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;
index c93a7c3cb6f65cc143dae5a61c6edfb7ed335ad2..3f5c51d511fb2d0b4dd658833b3f25b8930ba155 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <ltt/ltt.h>
 #include <ltt/event.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
 
 #include <lttv/lttv.h>
index 46ab96aa4e679bd3bebc29b113f8094ec9e63398..4f786f305ffe758b929efb9457036b016eeb185a 100644 (file)
@@ -43,9 +43,7 @@
 #include <string.h>
 #include <ltt/ltt.h>
 #include <ltt/event.h>
-#include <ltt/type.h>
 #include <ltt/trace.h>
-#include <ltt/facility.h>
 #include <lttv/module.h>
 #include <lttv/hook.h>
 #include <lttv/tracecontext.h>
This page took 0.039635 seconds and 4 git commands to generate.