X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fstate.c;h=935b3bba4aae37f1960aed4d8e0e0ef8c94df869;hb=e1de4b54dd75cfe38d496cede2bb77c10cc77faf;hp=9fa85a0d8c49c506f712b76d7c3f0d4abbc8a1fc;hpb=9ec91d57ee4f5ebd80bfe6ad82e19bec21a1f913;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 9fa85a0d..935b3bba 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1616,14 +1617,8 @@ create_name_tables(LttvTraceState *tcs) { int i, nb; - GQuark f_name, e_name; - LttvTraceHook h; - LttvTraceHookByFacility *thf; - - LttEventType *et; - LttType *t; GString *fe_name = g_string_new(""); @@ -1636,18 +1631,7 @@ create_name_tables(LttvTraceState *tcs) LTTV_POINTER, &v); g_assert(*(v.v_pointer) == NULL); *(v.v_pointer) = name_tables; -#if 0 // Use iteration over the facilities_by_name and then list all event - // types of each facility - nb = ltt_trace_eventtype_number(tcs->parent.t); - name_tables->eventtype_names = g_new(GQuark, nb); - for(i = 0 ; i < nb ; i++) { - et = ltt_trace_eventtype_get(tcs->parent.t, i); - e_name = ltt_eventtype_name(et); - f_name = ltt_facility_name(ltt_eventtype_facility(et)); - g_string_printf(fe_name, "%s.%s", f_name, e_name); - name_tables->eventtype_names[i] = g_quark_from_string(fe_name->str); - } -#endif //0 + if(!lttv_trace_find_hook(tcs->parent.t, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, @@ -1683,7 +1667,7 @@ create_name_tables(LttvTraceState *tcs) name_tables->nb_syscalls = 0; } - if(!lttv_trace_find_hook(tcs->parent.t, LTT_FACILITY_KERNEL_ARCH, + if(!lttv_trace_find_hook(tcs->parent.t, LTT_EVENT_TRAP_ENTRY, LTT_FIELD_TRAP_ID, 0, 0, NULL, NULL, &h)) { @@ -1714,7 +1698,7 @@ create_name_tables(LttvTraceState *tcs) } if(!lttv_trace_find_hook(tcs->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY, + LTT_EVENT_IRQ_ENTRY, LTT_FIELD_IRQ_ID, 0, 0, NULL, NULL, &h)) { @@ -1919,9 +1903,6 @@ static void push_state(LttvTracefileState *tfs, LttvExecutionMode t, int lttv_state_pop_state_cleanup(LttvProcessState *process, LttvTracefileState *tfs) { - guint cpu = tfs->cpu; - LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context; - guint depth = process->execution_stack->len; if(depth == 1){ @@ -1993,10 +1974,10 @@ static gint search_usertrace(gconstpointer a, gconstpointer b) /* Get smaller keys */ if(res->best) { if(ltt_time_compare(*elem_time, *res->best) < 0) { - res->best = elem_time; + res->best = (LttTime *)elem_time; } } else { - res->best = elem_time; + res->best = (LttTime *)elem_time; } return -1; } @@ -2033,8 +2014,6 @@ lttv_state_create_process(LttvTraceState *tcs, LttvProcessState *parent, LttvExecutionState *es; - LttvTraceContext *tc = (LttvTraceContext*)tcs; - char buffer[128]; process->pid = pid;