X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fbatchtest.c;h=a7de1fd71aee30f0c18d3c68cd5569d6d2f39d8e;hb=8fe3c6b699e245cf9a5263e687778dc10d501f4b;hp=bacca9ba31a804146a5f4e407b4f1091c556782c;hpb=51551c6ffe79971db022c2533db76f353523399e;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/batchtest.c b/ltt/branches/poly/lttv/lttv/batchtest.c index bacca9ba..a7de1fd7 100644 --- a/ltt/branches/poly/lttv/lttv/batchtest.c +++ b/ltt/branches/poly/lttv/lttv/batchtest.c @@ -176,12 +176,38 @@ gboolean trace_event(void __UNUSED__ *hook_data, void *call_data) return FALSE; } +static LttTime count_previous_time = { 0, 0 }; gboolean count_event(void *hook_data, void __UNUSED__ *call_data) { + LttvTracefileState *tfs = (LttvTracefileState *)call_data; + LttTracefile *tracefile = tfs->parent.tf; + guint nb_block, offset; + LttTracefile *tf_pos; + guint64 tsc; + LttEvent * event = ltt_tracefile_get_event(tracefile); + LttTime time; guint *pcount = (guint *)hook_data; (*pcount)++; + + time = ltt_event_time(event); + ltt_event_position(event, a_event_position); + ltt_event_position_get(a_event_position, &tf_pos, &nb_block, &offset, &tsc); + + if(ltt_time_compare(time, count_previous_time) < 0) { + g_warning("Time decreasing trace %s tracefile %s cpu %u position %u/%u", + g_quark_to_string(ltt_trace_name(ltt_tracefile_get_trace(tracefile))), + g_quark_to_string(ltt_tracefile_name(tracefile)), + ltt_tracefile_num(tracefile), nb_block, offset); + g_warning("last time %lu.%lu vs current %lu.%lu", + count_previous_time.tv_sec, count_previous_time.tv_nsec, + time.tv_sec, time.tv_nsec); + } + count_previous_time = time; + + + return FALSE; }