Handle irq and softirq correctly in the CFV
authorYannick Brosseau <yannick.brosseau@gmail.com>
Tue, 9 Apr 2013 04:50:32 +0000 (00:50 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Tue, 9 Apr 2013 04:50:32 +0000 (00:50 -0400)
A missing -1 in the name comparison was preventing the handling of irq and softirq event in the
eventhook.
Also use the currently running process instead of the find_process function

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
lttv/modules/gui/controlflow/eventhooks.c

index f8e880f4ae8dd8889a5b217e3fd8fd723fec7730..6269e5c48e1c42ec4c19e1b73999e0cf2ba00d25 100644 (file)
@@ -800,8 +800,8 @@ int before_execmode_hook(void *hook_data, void *call_data)
   event = (LttvEvent *) call_data;
   if ((strncmp(lttv_traceset_get_name_from_event(event),"sys_", sizeof("sys_") - 1) == 0)
           ||(strcmp(lttv_traceset_get_name_from_event(event),"exit_syscall") == 0)
-          ||(strncmp(lttv_traceset_get_name_from_event(event),"irq_handler_",sizeof("irq_handler_")) == 0)
-          ||(strncmp(lttv_traceset_get_name_from_event(event),"softirq_", sizeof("softirq_")) == 0)) {
+          ||(strncmp(lttv_traceset_get_name_from_event(event),"irq_handler_",sizeof("irq_handler_") -1) == 0)
+          ||(strncmp(lttv_traceset_get_name_from_event(event),"softirq_", sizeof("softirq_") - 1) == 0)) {
           
   LttTime evtime = lttv_event_get_timestamp(event);
   ControlFlowData *control_flow_data = (ControlFlowData*)hook_data;
@@ -812,7 +812,11 @@ int before_execmode_hook(void *hook_data, void *call_data)
   ts = event->state;
   
   guint trace_number = 0;//TODO fdeslauriers 2012-07-17: // Use trace handle to know trace number
-  process = lttv_state_find_process(ts ,cpu ,pid);
+
+  //TODO ybrosseau 2013-04-09 validate that using the running process is the right choice
+  //process = lttv_state_find_process(ts ,cpu ,pid);
+  process = ts->running_process[cpu];
+
   g_assert(process != NULL);
 
   guint pid = process->pid;
This page took 0.024271 seconds and 4 git commands to generate.