Fix eventview trap handling
And here is the offending code :
eventhooks.c :
int before_execmode_hook_trap(void *hook_data, void *call_data)
if (tfc->tf->name != LTT_CHANNEL_KERNEL)
return 0;
minfo = marker_get_info_from_id(tfc->tf->mdata, e->event_id);
g_assert(minfo != NULL);
if (minfo->name == LTT_EVENT_TRAP_ENTRY
|| minfo->name == LTT_EVENT_PAGE_FAULT_ENTRY
|| minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY) {
trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
} else if (minfo->name == LTT_EVENT_TRAP_EXIT
|| minfo->name == LTT_EVENT_PAGE_FAULT_EXIT
|| minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_EXIT) {
trap = ts->cpu_states[cpu].last_trap;
} else
return 0;
guint trace_num = ts->parent.index;
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
/* Add process to process list (if not present) */
guint pl_height = 0;
HashedResourceData *hashed_process_data = NULL;
ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_trap(resourceview_data, trace_num, trap);
we end up calling resourcelist_obtain_trap() with a trap id of 0.
I bet the trace first has a trap exit event, without any prior trap
entry. Therefore, the last_trap is probably set to -1, which is used as
trap id.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
git-svn-id: http://ltt.polymtl.ca/svn@3380
04897980-b3bd-0310-b5e0-
8ef037075253