From: Yannick Brosseau Date: Tue, 9 Apr 2013 04:50:32 +0000 (-0400) Subject: Handle irq and softirq correctly in the CFV X-Git-Tag: v1.5-beta1~20 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d940a891acb90efe23c4b3e2779cb05a9998e2a2;p=lttv.git Handle irq and softirq correctly in the CFV 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 --- diff --git a/lttv/modules/gui/controlflow/eventhooks.c b/lttv/modules/gui/controlflow/eventhooks.c index f8e880f4..6269e5c4 100644 --- a/lttv/modules/gui/controlflow/eventhooks.c +++ b/lttv/modules/gui/controlflow/eventhooks.c @@ -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;