state.c: populate irq_names with real irq names
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 10 Aug 2007 20:18:20 +0000 (20:18 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 10 Aug 2007 20:18:20 +0000 (20:18 +0000)
the names are obtained from the list.interrupt events

git-svn-id: http://ltt.polymtl.ca/svn@2585 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h

index a75161f3c4dcafc97dab2c23010a7a0e850660dc..b0f79fcfac323326486c13e6cebc26e81ae3dbd6 100644 (file)
@@ -75,7 +75,8 @@ GQuark
     LTT_EVENT_FUNCTION_EXIT,
     LTT_EVENT_THREAD_BRAND,
     LTT_EVENT_REQUEST_ISSUE,
-    LTT_EVENT_REQUEST_COMPLETE;
+    LTT_EVENT_REQUEST_COMPLETE,
+    LTT_EVENT_LIST_INTERRUPT;
 
 /* Fields Quarks */
 
@@ -102,7 +103,9 @@ GQuark
     LTT_FIELD_CALL_SITE,
     LTT_FIELD_MINOR,
     LTT_FIELD_MAJOR,
-    LTT_FIELD_OPERATION;
+    LTT_FIELD_OPERATION,
+    LTT_FIELD_ACTION,
+    LTT_FIELD_NUM;
 
 LttvExecutionMode
   LTTV_STATE_MODE_UNKNOWN,
@@ -2368,6 +2371,24 @@ static gboolean soft_irq_entry(void *hook_data, void *call_data)
   return FALSE;
 }
 
+static gboolean enum_interrupt(void *hook_data, void *call_data)
+{
+  LttvTracefileState *s = (LttvTracefileState *)call_data;
+  LttvTraceState *ts = (LttvTraceState *)s->parent.t_context;
+  LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
+  guint8 fac_id = ltt_event_facility_id(e);
+  guint8 ev_id = ltt_event_eventtype_id(e);
+  LttvTraceHookByFacility *thf = (LttvTraceHookByFacility *)hook_data;
+
+  GQuark action = g_quark_from_string(ltt_event_get_string(e, thf->f1));
+  guint irq = ltt_event_get_long_unsigned(e, thf->f2);
+
+  ts->irq_names[irq] = action;
+
+  return FALSE;
+}
+
+
 static gboolean bdev_request_issue(void *hook_data, void *call_data)
 {
   LttvTracefileState *s = (LttvTracefileState *)call_data;
@@ -3173,6 +3194,12 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
         statedump_end, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
     if(ret) hn--;
 
+    ret = lttv_trace_find_hook(ts->parent.t,
+        LTT_FACILITY_LIST, LTT_EVENT_LIST_INTERRUPT,
+        LTT_FIELD_ACTION, LTT_FIELD_NUM, 0,
+        enum_interrupt, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
+    if(ret) hn--;
+
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_ISSUE,
         LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION,
@@ -3900,6 +3927,7 @@ static void module_init()
   LTT_EVENT_THREAD_BRAND  = g_quark_from_string("thread_brand");
   LTT_EVENT_REQUEST_ISSUE = g_quark_from_string("_blk_request_issue");
   LTT_EVENT_REQUEST_COMPLETE = g_quark_from_string("_blk_request_complete");
+  LTT_EVENT_LIST_INTERRUPT = g_quark_from_string("interrupt");;
 
 
   LTT_FIELD_SYSCALL_ID    = g_quark_from_string("syscall_id");
@@ -3925,6 +3953,8 @@ static void module_init()
   LTT_FIELD_MAJOR     = g_quark_from_string("major");
   LTT_FIELD_MINOR     = g_quark_from_string("minor");
   LTT_FIELD_OPERATION     = g_quark_from_string("direction");
+  LTT_FIELD_ACTION        = g_quark_from_string("action");
+  LTT_FIELD_NUM           = g_quark_from_string("num");
   
   LTTV_CPU_UNKNOWN = g_quark_from_string("unknown");
   LTTV_CPU_IDLE = g_quark_from_string("idle");
index c8259f28f9569993a2dfbe5a5e2013b4065cf68b..75d1370687ad5abb2ee44a35fef48033329f9406 100644 (file)
@@ -86,7 +86,8 @@ extern GQuark
     LTT_EVENT_FUNCTION_EXIT,
     LTT_EVENT_THREAD_BRAND,
     LTT_EVENT_REQUEST_ISSUE,
-    LTT_EVENT_REQUEST_COMPLETE;
+    LTT_EVENT_REQUEST_COMPLETE,
+    LTT_EVENT_LIST_INTERRUPT;
 
 /* Fields Quarks */
 
@@ -112,7 +113,9 @@ extern GQuark
     LTT_FIELD_CALL_SITE,
     LTT_FIELD_MINOR,
     LTT_FIELD_MAJOR,
-    LTT_FIELD_OPERATION;
+    LTT_FIELD_OPERATION,
+    LTT_FIELD_ACTION,
+    LTT_FIELD_NUM;
 
 typedef struct _LttvTracesetState LttvTracesetState;
 typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
This page took 0.026936 seconds and 4 git commands to generate.