resourceview: trap resource fixes
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 27 Nov 2007 16:43:28 +0000 (16:43 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 27 Nov 2007 16:43:28 +0000 (16:43 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2771 04897980-b3bd-0310-b5e0-8ef037075253

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

index 17c5906e508f74d086de1d125b1de1bbd489e188..3ef8a2162318cbaa26a82aae9ec39cd35d6f833d 100644 (file)
@@ -2314,6 +2314,7 @@ static gboolean syscall_exit(void *hook_data, void *call_data)
 static gboolean trap_entry(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);
   LttvTraceHook *th = (LttvTraceHook *)hook_data;
   struct marker_field *f = lttv_trace_get_hook_field(th, 0);
@@ -2338,18 +2339,28 @@ static gboolean trap_entry(void *hook_data, void *call_data)
   /* update cpu status */
   cpu_push_mode(s->cpu_state, LTTV_CPU_TRAP);
 
+  /* update trap status */
+  s->cpu_state->last_trap = trap;
+  ts->trap_states[trap].running++;
+
   return FALSE;
 }
 
 static gboolean trap_exit(void *hook_data, void *call_data)
 {
   LttvTracefileState *s = (LttvTracefileState *)call_data;
+  LttvTraceState *ts = (LttvTraceState *)s->parent.t_context;
+  guint trap = s->cpu_state->last_trap;
 
   pop_state(s, LTTV_STATE_TRAP);
 
   /* update cpu status */
   cpu_pop_mode(s->cpu_state);
 
+  /* update trap status */
+  if(ts->trap_states[trap].running)
+    ts->trap_states[trap].running--;
+
   return FALSE;
 }
 
index a78fd2e5c20c9834a5aec2523fe4e4e74de19ca0..294b8339f6cfe448cfc5204d6f05a78854b2be47 100644 (file)
@@ -110,7 +110,7 @@ GdkColor drawing_colors_soft_irq[NUM_COLORS_SOFT_IRQ] =
 GdkColor drawing_colors_trap[NUM_COLORS_TRAP] =
 { /* Pixel, R, G, B */
   { 0, 0x0000, 0x0000, 0x0000 }, /* COL_TRAP_UNKNOWN */
-  { 0, 0xBBBB, 0xBBBB, 0xBBBB }, /* COL_TRAP_IDLE */
+  { 0, 0x0000, 0x0000, 0x0000 }, /* COL_TRAP_IDLE */
   { 0, 0xFF00, 0xFF00, 0x0100 }, /* COL_TRAP_BUSY */
 };
 
index 6e42ed326b60b55dc226045b4654b2449bd849df..778ec18a5300f1a3df98cc4f09979c3efb09e7a8 100644 (file)
@@ -1167,8 +1167,8 @@ int before_execmode_hook_trap(void *hook_data, void *call_data)
   guint64 trap;
   guint cpu = tfs->cpu;
 
-  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)));
+  guint16 ev_id_entry = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_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_ARCH, LTT_EVENT_TRAP_EXIT)));
   if(ev_id_entry == e->event_id) {
     trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
   }
This page took 0.02891 seconds and 4 git commands to generate.