ok with new tracer
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Apr 2007 18:29:02 +0000 (18:29 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Apr 2007 18:29:02 +0000 (18:29 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2466 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/tracefile.c
ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h
ltt/branches/poly/lttv/lttv/stats.c
ltt/branches/poly/lttv/lttv/tracecontext.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c

index 044ae4706009f19b409442c32ca4bd5dd532dc23..8ac4b5061de96a70269dfedc3a539642d55c11cd 100644 (file)
@@ -2217,7 +2217,13 @@ no_offset:
                /* Event size too big to fit in the event size field */
                tf->event.event_size = tf->event.data_size;
        }
-  g_assert(tf->event.data_size == tf->event.event_size);
+  if (tf->event.data_size != tf->event.event_size) {
+    g_error("Kernel/LTTV event size differs for event %s.%s: kernel %u, LTTV %u",
+               g_quark_to_string(f->name), g_quark_to_string(event_type->name),
+               tf->event.event_size, tf->event.data_size);
+    exit(-1);
+  }
+  //g_assert(tf->event.data_size == tf->event.event_size);
 
   return;
 
index a9cc924fcaa6e09dd020dcfb681798d140b77771..00c37cb86149d5166749e71d9fe4c83962d87b51 100644 (file)
@@ -81,13 +81,14 @@ GQuark
     LTT_FIELD_TRAP_ID,
     LTT_FIELD_IRQ_ID,
     LTT_FIELD_SOFT_IRQ_ID,
-    LTT_FIELD_OUT,
-    LTT_FIELD_IN,
-    LTT_FIELD_OUT_STATE,
+    LTT_FIELD_PREV_PID,
+    LTT_FIELD_NEXT_PID,
+    LTT_FIELD_PREV_STATE,
     LTT_FIELD_PARENT_PID,
     LTT_FIELD_CHILD_PID,
     LTT_FIELD_PID,
     LTT_FIELD_TGID,
+    LTT_FIELD_CHILD_TGID,
     LTT_FIELD_FILENAME,
     LTT_FIELD_NAME,
     LTT_FIELD_TYPE,
@@ -2365,6 +2366,7 @@ static gboolean process_exec(void *hook_data, void *call_data)
   guint cpu = s->cpu;
   LttvProcessState *process = ts->running_process[cpu];
 
+#if 0//how to use a sequence that must be transformed in a string
   /* PID of the process to release */
   guint64 name_len = ltt_event_field_element_number(e, thf->f1);
   //name = ltt_event_get_string(e, thf->f1);
@@ -2374,10 +2376,12 @@ static gboolean process_exec(void *hook_data, void *call_data)
   gchar *null_term_name = g_new(gchar, name_len+1);
   memcpy(null_term_name, name_begin, name_len);
   null_term_name[name_len] = '\0';
-
   process->name = g_quark_from_string(null_term_name);
+#endif //0
+
+  process->name = ltt_event_get_string(e, thf->f1);
   process->brand = LTTV_STATE_UNBRANDED;
-  g_free(null_term_name);
+  //g_free(null_term_name);
   return FALSE;
 }
 
@@ -2722,13 +2726,13 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
-        LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+        LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
         schedchange, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
     if(ret) hn--;
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FORK,
-        LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, LTT_FIELD_TGID,
+        LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, LTT_FIELD_CHILD_TGID,
         process_fork, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
     if(ret) hn--;
 
@@ -3478,7 +3482,7 @@ static void module_init()
   LTT_EVENT_PROCESS_FORK          = g_quark_from_string("process_fork");
   LTT_EVENT_KTHREAD_CREATE = g_quark_from_string("kthread_create");
   LTT_EVENT_PROCESS_EXIT          = g_quark_from_string("process_exit");
-  LTT_EVENT_PROCESS_FREE          = g_quark_from_string("procesS_free");
+  LTT_EVENT_PROCESS_FREE          = g_quark_from_string("process_free");
   LTT_EVENT_EXEC          = g_quark_from_string("exec");
   LTT_EVENT_PROCESS_STATE  = g_quark_from_string("process_state");
   LTT_EVENT_STATEDUMP_END  = g_quark_from_string("statedump_end");
@@ -3491,13 +3495,14 @@ static void module_init()
   LTT_FIELD_TRAP_ID       = g_quark_from_string("trap_id");
   LTT_FIELD_IRQ_ID        = g_quark_from_string("irq_id");
   LTT_FIELD_SOFT_IRQ_ID        = g_quark_from_string("softirq_id");
-  LTT_FIELD_OUT           = g_quark_from_string("out");
-  LTT_FIELD_IN            = g_quark_from_string("in");
-  LTT_FIELD_OUT_STATE     = g_quark_from_string("out_state");
+  LTT_FIELD_PREV_PID            = g_quark_from_string("prev_pid");
+  LTT_FIELD_NEXT_PID           = g_quark_from_string("next_pid");
+  LTT_FIELD_PREV_STATE     = g_quark_from_string("prev_state");
   LTT_FIELD_PARENT_PID    = g_quark_from_string("parent_pid");
   LTT_FIELD_CHILD_PID     = g_quark_from_string("child_pid");
   LTT_FIELD_PID           = g_quark_from_string("pid");
   LTT_FIELD_TGID          = g_quark_from_string("tgid");
+  LTT_FIELD_CHILD_TGID    = g_quark_from_string("child_tgid");
   LTT_FIELD_FILENAME      = g_quark_from_string("filename");
   LTT_FIELD_NAME          = g_quark_from_string("name");
   LTT_FIELD_TYPE          = g_quark_from_string("type");
index 7884ff2fe363ece40eda83cefe7722b394d8ede4..68c6eb2569378d029691d92a71c3381f3bf043d5 100644 (file)
@@ -92,9 +92,9 @@ extern GQuark
     LTT_FIELD_TRAP_ID,
     LTT_FIELD_IRQ_ID,
     LTT_FIELD_SOFT_IRQ_ID,
-    LTT_FIELD_OUT,
-    LTT_FIELD_IN,
-    LTT_FIELD_OUT_STATE,
+    LTT_FIELD_PREV_PID,
+    LTT_FIELD_NEXT_PID,
+    LTT_FIELD_PREV_STATE,
     LTT_FIELD_PARENT_PID,
     LTT_FIELD_CHILD_PID,
     LTT_FIELD_PID,
index 179fde3f0de21ac9e01e4cb8a048a4ce835662cb..0fd94a009acd18ea502c28913288453b2659d4ed 100644 (file)
@@ -1145,7 +1145,7 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
-        LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+        LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
         before_schedchange, NULL, 
         &g_array_index(hooks, LttvTraceHook, hn++));
     if(ret) hn--;
@@ -1238,7 +1238,7 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
-        LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+        LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
         after_schedchange, NULL, 
         &g_array_index(hooks, LttvTraceHook, hn++));
     if(ret) hn--;
index 1886d39f07bd7b35d71f7a95c95ade0b7fe46515..5ecdae22b4f0af9499cca9be71b1d9ea396e856c 100644 (file)
@@ -955,11 +955,18 @@ gboolean lttv_process_traceset_seek_position(LttvTracesetContext *self,
 static LttField *
 find_field(LttEventType *et, const GQuark field)
 {
-  GQuark name;
+  LttField *f;
 
   if(field == 0) return NULL;
   
-  return ltt_eventtype_field_by_name(et, field);
+  f = ltt_eventtype_field_by_name(et, field);
+  if (!f) {
+    g_warning("Cannot find field %s in event %s.%s", g_quark_to_string(field),
+       g_quark_to_string(ltt_facility_name(ltt_eventtype_facility(et))),
+       g_quark_to_string(ltt_eventtype_name(et)));
+  }
+
+  return f;
 }
 
 LttvTraceHookByFacility *lttv_trace_hook_get_fac(LttvTraceHook *th, 
index 37d083b594635cac2141ce1ea1f08f57dd5ed561..e0b92aa3fc526ec49bba9444916e68139249d64e 100644 (file)
@@ -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, LTT_EVENT_TRAP_ENTRY,
+          LTT_FACILITY_KERNEL_ARCH, 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, LTT_EVENT_TRAP_EXIT,
+          LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT,
           0, 0, 0, 
           before_execmode_hook,
           events_request,
@@ -292,7 +292,7 @@ void drawing_data_request(Drawing_t *drawing,
 
       ret = lttv_trace_find_hook(ts->parent.t,
           LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
-          LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+          LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
           before_schedchange_hook,
           events_request,
           &g_array_index(hooks, LttvTraceHook, before_hn++));
@@ -375,7 +375,7 @@ void drawing_data_request(Drawing_t *drawing,
       
       ret = lttv_trace_find_hook(ts->parent.t,
           LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
-          LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
+          LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
           after_schedchange_hook,
           events_request,
           &g_array_index(hooks, LttvTraceHook, after_hn++));
This page took 0.030662 seconds and 4 git commands to generate.