add debug to state.c
[lttv.git] / trunk / lttv / lttv / lttv / state.c
index 1c9ca83d96b242da452cc6ceb4131adb3f8f6195..a519761869c2609834c910567f79063d79b1efa4 100644 (file)
@@ -49,7 +49,6 @@
 
 GQuark
     LTT_FACILITY_KERNEL,
-    LTT_FACILITY_KERNEL_ARCH,
     LTT_FACILITY_LIST,
     LTT_FACILITY_FS,
     LTT_FACILITY_USER_GENERIC,
@@ -1876,7 +1875,7 @@ create_name_tables(LttvTraceState *tcs)
   hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 1);
 
   if(!lttv_trace_find_hook(tcs->parent.t,
-      LTT_FACILITY_KERNEL_ARCH,
+      LTT_FACILITY_KERNEL,
       LTT_EVENT_SYSCALL_ENTRY,
       FIELD_ARRAY(LTT_FIELD_SYSCALL_ID),
       NULL, NULL, &hooks)) {
@@ -1912,7 +1911,7 @@ create_name_tables(LttvTraceState *tcs)
   lttv_trace_hook_remove_all(&hooks);
 
   if(!lttv_trace_find_hook(tcs->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_TRAP_ENTRY,
         FIELD_ARRAY(LTT_FIELD_TRAP_ID),
         NULL, NULL, &hooks)) {
@@ -2947,7 +2946,13 @@ static gboolean process_fork(void *hook_data, void *call_data)
      *
      * Simply put a correct parent.
      */
-    g_error("Process %u has been created before fork on cpu %u. Probably an unsynchronized TSC problem on the traced machine.", child_pid, cpu);
+    g_error("Process %u has been created at [%lu.%09lu] before \n"
+            "fork on cpu %u[%lu.%09lu].\n"
+            "Probably an unsynchronized TSC problem on the traced machine.",
+            child_pid,
+            child_process->creation_time.tv_sec,
+            child_process->creation_time.tv_nsec,
+            cpu, ltt_event_time(e).tv_sec, ltt_event_time(e).tv_nsec);
     //g_assert(0); /* This is a problematic case : the process has been created
     //                before the fork event */
     child_process->ppid = process->pid;
@@ -3379,25 +3384,25 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
     //hn = 0;
 
     lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_SYSCALL_ENTRY,
         FIELD_ARRAY(LTT_FIELD_SYSCALL_ID),
        syscall_entry, NULL, &hooks);
 
     lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_SYSCALL_EXIT,
         NULL,
         syscall_exit, NULL, &hooks);
 
     lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_TRAP_ENTRY,
         FIELD_ARRAY(LTT_FIELD_TRAP_ID),
         trap_entry, NULL, &hooks);
 
     lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_TRAP_EXIT,
         NULL,
         trap_exit, NULL, &hooks);
@@ -3447,7 +3452,7 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
         process_fork, NULL, &hooks);
 
     lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL_ARCH,
+        LTT_FACILITY_KERNEL,
         LTT_EVENT_KTHREAD_CREATE,
         FIELD_ARRAY(LTT_FIELD_PID),
         process_kernel_thread, NULL, &hooks);
@@ -4191,7 +4196,6 @@ static void module_init()
 
   
   LTT_FACILITY_KERNEL     = g_quark_from_string("kernel");
-  LTT_FACILITY_KERNEL_ARCH = g_quark_from_string("kernel_arch");
   LTT_FACILITY_FS    = g_quark_from_string("fs");
   LTT_FACILITY_LIST = g_quark_from_string("list");
   LTT_FACILITY_USER_GENERIC    = g_quark_from_string("user_generic");
This page took 0.028208 seconds and 4 git commands to generate.