&vheader->start_monotonic);
t->start_time = ltt_get_time(LTT_GET_BO(tf),
&vheader->start_time);
+ t->start_time_from_tsc = ltt_time_from_uint64(
+ (double)t->start_tsc * 1000000.0 / (double)t->start_freq);
}
}
break;
// time = ltt_time_from_uint64(
// cycles_2_ns(tf, (guint64)(tf->buffer.tsc - tf->buffer.begin.cycle_count)));
- time = ltt_time_from_uint64((tf->buffer.tsc - tf->trace->start_tsc) * 1000000
+ time = ltt_time_from_uint64(
+ (double)(tf->buffer.tsc - tf->trace->start_tsc) * 1000000.0
/ (double)tf->trace->start_freq);
//time = ltt_time_add(tf->buffer.begin.timestamp, time);
- time = ltt_time_add(tf->trace->start_time, time);
+ time = ltt_time_add(tf->trace->start_time_from_tsc, time);
return time;
}
&header->begin.freq);
tf->buffer.begin.timestamp = ltt_time_add(
ltt_time_from_uint64(
- (tf->buffer.begin.cycle_count
- - tf->trace->start_tsc) * 1000000
+ (double)(tf->buffer.begin.cycle_count
+ - tf->trace->start_tsc) * 1000000.0
/ (double)tf->trace->start_freq),
- tf->trace->start_time);
+ tf->trace->start_time_from_tsc);
#if 0
tf->buffer.end.timestamp = ltt_time_add(
&header->lost_size);
tf->buffer.end.timestamp = ltt_time_add(
ltt_time_from_uint64(
- (tf->buffer.end.cycle_count
- - tf->trace->start_tsc) * 1000000
+ (double)(tf->buffer.end.cycle_count
+ - tf->trace->start_tsc) * 1000000.0
/ (double)tf->trace->start_freq),
- tf->trace->start_time);
+ tf->trace->start_time_from_tsc);
tf->buffer.tsc = tf->buffer.begin.cycle_count;
tf->event.tsc = tf->buffer.tsc;