Disable use of SEEK_LAST until it is integrated in babeltrace
authorYannick Brosseau <yannick.brosseau@gmail.com>
Mon, 13 Aug 2012 21:47:24 +0000 (17:47 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Mon, 13 Aug 2012 21:47:24 +0000 (17:47 -0400)
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
lttv/lttv/traceset.c

index b40ca4e7a50434b0baac0537b2bf5c2002237c60..7a9eb8b43b5272b9c1bb3a0804ce582104039279 100644 (file)
@@ -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);
 }
 
@@ -597,6 +597,8 @@ guint64 lttv_traceset_get_timestamp_end(LttvTraceset *traceset)
  */
 TimeInterval lttv_traceset_get_time_span_real(LttvTraceset *ts)
 {
+#ifdef BABEL_HAS_SEEK_LAST     
+
        if(ltt_time_compare(ts->time_span.start_time, 
                                ltt_time_from_uint64(0)) == 0 && ts->traces->len > 0){
                ts->time_span.start_time = ltt_time_from_uint64(
@@ -605,6 +607,9 @@ TimeInterval lttv_traceset_get_time_span_real(LttvTraceset *ts)
                                lttv_traceset_get_timestamp_last_event(ts));
        }
         return ts->time_span;
+#else
+       return lttv_traceset_get_time_span(ts);
+#endif
 }
 
 /*
This page took 0.02535 seconds and 4 git commands to generate.