X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttv%2Flttv%2Ftracecontext.c;h=48a28eed34f37313efa0243347552e2ffa06d4b6;hb=800dfee05db51677ab91103c993d14753184c4bd;hp=edb465ba017466818db5bc8e5775312b12df62f0;hpb=06ed3363a1e822db4bc0ee1b20dac59c0676eaa9;p=lttv.git diff --git a/lttv/lttv/tracecontext.c b/lttv/lttv/tracecontext.c index edb465ba..48a28eed 100644 --- a/lttv/lttv/tracecontext.c +++ b/lttv/lttv/tracecontext.c @@ -101,7 +101,7 @@ lttv_context_new_tracefile_context(LttvTracesetContext *self) /**************************************************************************** * lttv_traceset_context_compute_time_span * - * Keep the time span is sync with on the fly addition and removal of traces + * Keep the time span in sync with on the fly addition and removal of traces * in a trace set. It must be called each time a trace is added/removed from * the traceset. It could be more efficient to call it only once a bunch * of traces are loaded, but the calculation is not long, so it's not @@ -109,9 +109,8 @@ lttv_context_new_tracefile_context(LttvTracesetContext *self) * * Author : Xang Xiu Yang ***************************************************************************/ -static void lttv_traceset_context_compute_time_span( - LttvTracesetContext *self, - TimeInterval *time_span) +void lttv_traceset_context_compute_time_span(LttvTracesetContext *self, + TimeInterval *time_span) { LttvTraceset * traceset = self->ts; int numTraces = lttv_traceset_number(traceset); @@ -1287,7 +1286,10 @@ LttvTracefileContext *lttv_traceset_context_get_current_tfc(LttvTracesetContext */ void lttv_process_traceset_synchronize_tracefiles(LttvTracesetContext *tsc) { - g_assert(lttv_process_traceset_seek_position(tsc, tsc->sync_position) == 0); + int retval; + + retval= lttv_process_traceset_seek_position(tsc, tsc->sync_position); + g_assert_cmpint(retval, ==, 0); } @@ -1414,6 +1416,7 @@ guint lttv_process_traceset_seek_n_backward(LttvTracesetContext *self, LttTime time_offset; struct seek_back_data sd; LttvHooks *hooks = lttv_hooks_new(); + int retval; sd.first_event = 0; sd.events_found = 0; @@ -1506,11 +1509,13 @@ guint lttv_process_traceset_seek_n_backward(LttvTracesetContext *self, LttvTracesetContextPosition *pos = (LttvTracesetContextPosition*)g_ptr_array_index (sd.array, sd.first_event); - g_assert(lttv_process_traceset_seek_position(self, pos) == 0); + retval= lttv_process_traceset_seek_position(self, pos); + g_assert_cmpint(retval, ==, 0); } else { /* Will seek to the last saved position : in the worst case, it will be the * original position (if events_found is 0) */ - g_assert(lttv_process_traceset_seek_position(self, saved_pos) == 0); + retval= lttv_process_traceset_seek_position(self, saved_pos); + g_assert_cmpint(retval, ==, 0); } for(i=0;ilen;i++) {