From: Yannick Brosseau Date: Mon, 20 Aug 2012 21:24:15 +0000 (-0400) Subject: Use BT_SEEK_LAST X-Git-Tag: v1.5-beta1~40 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c0b8f3e8a6e9bff5c093db71c9b0fda2e50cabe3;p=lttv.git Use BT_SEEK_LAST Signed-off-by: Yannick Brosseau --- diff --git a/lttv/lttv/traceset.c b/lttv/lttv/traceset.c index 61349656..99b34aee 100644 --- a/lttv/lttv/traceset.c +++ b/lttv/lttv/traceset.c @@ -520,11 +520,11 @@ guint64 lttv_traceset_get_timestamp_last_event(LttvTraceset *ts) last_position.bt_pos = &pos; last_position.timestamp = G_MAXUINT64; last_position.cpu_id = INT_MAX; -#ifdef BABEL_HAS_SEEK_LAST + /* Assign iterator to the last event of the traces */ last_position.bt_pos->type = BT_SEEK_LAST; last_position.iter = ts->iter; -#endif + return lttv_traceset_position_get_timestamp(&last_position); } @@ -605,13 +605,8 @@ TimeInterval lttv_traceset_get_time_span_real(LttvTraceset *ts) ltt_time_zero) == 0 && ts->traces->len > 0){ ts->time_span.start_time = ltt_time_from_uint64( lttv_traceset_get_timestamp_first_event(ts)); -#ifdef BABEL_HAS_SEEK_LAST ts->time_span.end_time = ltt_time_from_uint64( - lttv_traceset_get_timestamp_end(ts)); -#else - ts->time_span.end_time = ltt_time_from_uint64( - lttv_traceset_get_timestamp_end(ts)); -#endif + lttv_traceset_get_timestamp_last_event(ts)); } return ts->time_span; }