resourceview: display softirq raise in softirq resource
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 30 May 2008 15:15:29 +0000 (15:15 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 30 May 2008 15:15:29 +0000 (15:15 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2932 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c
ltt/branches/poly/lttv/modules/gui/resourceview/drawing.h
ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c

index 294b8339f6cfe448cfc5204d6f05a78854b2be47..a4e2b684bf278596eebc597aa75b73c452c023c3 100644 (file)
@@ -104,6 +104,7 @@ GdkColor drawing_colors_soft_irq[NUM_COLORS_SOFT_IRQ] =
 { /* Pixel, R, G, B */
   { 0, 0x0000, 0x0000, 0x0000 }, /* COL_SOFT_IRQ_UNKNOWN */
   { 0, 0x0000, 0x0000, 0x0000 }, /* COL_SOFT_IRQ_IDLE */
+  { 0, 0xFFFF, 0xD400, 0xD400 }, /* COL_SOFT_IRQ_PENDING */
   { 0, 0xFFFF, 0x9400, 0x9600 }, /* COL_SOFT_IRQ_BUSY */
 };
 
@@ -293,6 +294,14 @@ void drawing_data_request(Drawing_t *drawing,
           events_request,
           &hooks);
 
+      lttv_trace_find_hook(ts->parent.t,
+          LTT_FACILITY_KERNEL,
+          LTT_EVENT_SOFT_IRQ_RAISE,
+          FIELD_ARRAY(LTT_FIELD_SOFT_IRQ_ID),
+          before_execmode_hook,
+          events_request,
+          &hooks);
+
       lttv_trace_find_hook(ts->parent.t,
           LTT_FACILITY_KERNEL,
           LTT_EVENT_SOFT_IRQ_ENTRY,
index 16278fd4cb577f457f353da6fb23c6567332d681..8b0070bd5bdcb0e361652222ca44fbb85b7b5774 100644 (file)
@@ -70,6 +70,7 @@ typedef enum _draw_color_irq {
 typedef enum _draw_color_soft_irq {
                 COL_SOFT_IRQ_UNKNOWN,
                 COL_SOFT_IRQ_IDLE,
+                COL_SOFT_IRQ_PENDING,
                 COL_SOFT_IRQ_BUSY,
                 NUM_COLORS_SOFT_IRQ
 } draw_color_soft_irq; 
index 778ec18a5300f1a3df98cc4f09979c3efb09e7a8..676dce93f1a53124085639e24389dd873c9c69ac 100644 (file)
@@ -313,10 +313,12 @@ static void irq_set_line_color(PropertiesLine *prop_line, LttvIRQState *s)
 static void soft_irq_set_line_color(PropertiesLine *prop_line, LttvSoftIRQState *s)
 {
   GQuark present_state;
-  if(s->running == 0)
-    prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_IDLE];
-  else
+  if(s->running)
     prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_BUSY];
+  else if(s->pending)
+    prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_PENDING];
+  else
+    prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_IDLE];
 }
 
 static void trap_set_line_color(PropertiesLine *prop_line, LttvTrapState *s)
@@ -1002,9 +1004,10 @@ int before_execmode_hook_soft_irq(void *hook_data, void *call_data)
   guint64 softirq;
   guint cpu = tfs->cpu;
 
+  guint16 ev_id_raise = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_RAISE)));
   guint16 ev_id_entry = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY)));
   guint16 ev_id_exit = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT)));
-  if(ev_id_entry == e->event_id) {
+  if(ev_id_entry == e->event_id || ev_id_raise == e->event_id) {
     softirq = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
   }
   else if(ev_id_exit == e->event_id) {
This page took 0.026481 seconds and 4 git commands to generate.