kprobe names half done
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 Jan 2009 09:44:05 +0000 (09:44 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 Jan 2009 09:44:05 +0000 (09:44 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@3299 04897980-b3bd-0310-b5e0-8ef037075253

trunk/lttv/lttv/lttv/print.c
trunk/lttv/lttv/lttv/state.c
trunk/lttv/lttv/lttv/state.h

index 79023acfa6720a5cd66b87c5b91cfa2faaeeede5..95c09ead0d26da6ec079a018fce736a637eca674 100644 (file)
@@ -51,20 +51,26 @@ static inline void print_enum_events(LttEvent *e, struct marker_field *f,
   struct marker_info *info = marker_get_info_from_id(tf->mdata, e->event_id);
   LttvTraceState *ts = (LttvTraceState*)(tfs->parent.t_context);
   
-  if (tf->name == LTT_CHANNEL_KERNEL &&
-      info->name == LTT_EVENT_SYSCALL_ENTRY && 
-      f->name == LTT_FIELD_SYSCALL_ID) {
-    g_string_append_printf(s, " [%s]",
-      g_quark_to_string(ts->syscall_names[value]));
-  } else if ((tf->name == LTT_CHANNEL_KERNEL &&
-    (info->name == LTT_EVENT_SOFT_IRQ_ENTRY
-    || info->name == LTT_EVENT_SOFT_IRQ_EXIT
-    || info->name == LTT_EVENT_SOFT_IRQ_RAISE)) &&
-      f->name == LTT_FIELD_SOFT_IRQ_ID) {
-    g_string_append_printf(s, " [%s]",
-      g_quark_to_string(ts->soft_irq_names[value]));
+  if (tf->name == LTT_CHANNEL_KERNEL) {
+    if (info->name == LTT_EVENT_SYSCALL_ENTRY
+        && f->name == LTT_FIELD_SYSCALL_ID) {
+      g_string_append_printf(s, " [%s]",
+        g_quark_to_string(ts->syscall_names[value]));
+    } else if ((info->name == LTT_EVENT_SOFT_IRQ_ENTRY
+                || info->name == LTT_EVENT_SOFT_IRQ_EXIT
+                || info->name == LTT_EVENT_SOFT_IRQ_RAISE)
+               && f->name == LTT_FIELD_SOFT_IRQ_ID) {
+      g_string_append_printf(s, " [%s]",
+        g_quark_to_string(ts->soft_irq_names[value]));
+    }
+/* TODO : implement hash table.
+      else if (info->name == LTT_EVENT_KPROBE
+               && f->name = LTT_FIELD_IP) {
+      g_string_append_printf(s, " [%s]",
+        g_quark_to_string(ts->kprobe_symbols[value]));
+    }
+*/
   }
-
 }
 
 void lttv_print_field(LttEvent *e, struct marker_field *f, GString *s,
index 8f97550759efd9fa24bfb61dfee99a7c91fd034f..3574868ad254fb3cba1c3379c882caa0e3c1162b 100644 (file)
@@ -96,7 +96,8 @@ GQuark
     LTT_EVENT_REQUEST_COMPLETE,
     LTT_EVENT_LIST_INTERRUPT,
     LTT_EVENT_SYS_CALL_TABLE,
-    LTT_EVENT_SOFTIRQ_VEC;
+    LTT_EVENT_SOFTIRQ_VEC,
+    LTT_EVENT_KPROBE_TABLE;
 
 /* Fields Quarks */
 
@@ -127,7 +128,8 @@ GQuark
     LTT_FIELD_ACTION,
     LTT_FIELD_ID,
     LTT_FIELD_ADDRESS,
-    LTT_FIELD_SYMBOL;
+    LTT_FIELD_SYMBOL,
+    LTT_FIELD_IP;
 
 LttvExecutionMode
   LTTV_STATE_MODE_UNKNOWN,
@@ -4283,6 +4285,7 @@ static void module_init()
   LTT_EVENT_LIST_INTERRUPT = g_quark_from_string("interrupt");
   LTT_EVENT_SYS_CALL_TABLE = g_quark_from_string("sys_call_table");
   LTT_EVENT_SOFTIRQ_VEC = g_quark_from_string("softirq_vec");
+  LTT_EVENT_KPROBE_TABLE = g_quark_from_string("kprobe_table");
 
   LTT_FIELD_SYSCALL_ID    = g_quark_from_string("syscall_id");
   LTT_FIELD_TRAP_ID       = g_quark_from_string("trap_id");
@@ -4311,6 +4314,7 @@ static void module_init()
   LTT_FIELD_ID            = g_quark_from_string("id");
   LTT_FIELD_ADDRESS       = g_quark_from_string("address");
   LTT_FIELD_SYMBOL        = g_quark_from_string("symbol");
+  LTT_FIELD_IP            = g_quark_from_string("ip");
   
   LTTV_CPU_UNKNOWN = g_quark_from_string("unknown");
   LTTV_CPU_IDLE = g_quark_from_string("idle");
index 8c5fc04006dd610bdfb82857d36dc2a328f06b2b..9f4fdd061ef36b25abbf944ed7a6aebf3a0095dc 100644 (file)
@@ -103,7 +103,8 @@ extern GQuark
     LTT_EVENT_REQUEST_COMPLETE,
     LTT_EVENT_LIST_INTERRUPT,
     LTT_EVENT_SYS_CALL_TABLE,
-    LTT_EVENT_SOFTIRQ_VEC;
+    LTT_EVENT_SOFTIRQ_VEC,
+    LTT_EVENT_KPROBE_TABLE;
 
 /* Fields Quarks */
 
@@ -133,7 +134,8 @@ extern GQuark
     LTT_FIELD_ACTION,
     LTT_FIELD_ID,
     LTT_FIELD_ADDRESS,
-    LTT_FIELD_SYMBOL;
+    LTT_FIELD_SYMBOL,
+    LTT_FIELD_IP;
 
 typedef struct _LttvTracesetState LttvTracesetState;
 typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
This page took 0.027154 seconds and 4 git commands to generate.