X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fconvert%2Fconvert.c;h=b996b8b2bffc914e9e3997a2fc2145a45922fd56;hb=e4eced0fb7cd23ba2b16eff08f2185bed49ab5e5;hp=60dc3a6031498a751fcb14726df56d5577a8a0cb;hpb=9ca560eb801f018c5cbc64c24b66b36e52b8ba32;p=lttv.git diff --git a/ltt/branches/poly/ltt/convert/convert.c b/ltt/branches/poly/ltt/convert/convert.c index 60dc3a60..b996b8b2 100644 --- a/ltt/branches/poly/ltt/convert/convert.c +++ b/ltt/branches/poly/ltt/convert/convert.c @@ -124,7 +124,7 @@ int main(int argc, char ** argv){ trace_file_system * tFileSys; uint16_t newId, startId, tmpId; uint8_t evId; - uint32_t time_delta, startTimeDelta; + uint32_t time_delta, startTimeDelta, previous_time_delta; void * cur_pos, *end_pos; buffer_start start, start_proc, start_intr; buffer_start end, end_proc, end_intr; @@ -344,6 +344,7 @@ int main(int argc, char ** argv){ startId = newId; startTimeDelta = time_delta; + previous_time_delta = time_delta; start.seconds = tBufStart->Time.tv_sec; start.nanoseconds = tBufStart->Time.tv_usec; start.cycle_count = tBufStart->TSC; @@ -448,6 +449,11 @@ int main(int argc, char ** argv){ time_delta = *(uint32_t*)cur_pos; cur_pos += sizeof(uint32_t); + if(time_delta < previous_time_delta){ + end.cycle_count += OVERFLOW_FIGURE; + } + previous_time_delta = time_delta; + if(ltt_log_cpu){ write_to_buffer(write_pos[cpu_id],(void*)&newId,sizeof(uint16_t)); write_to_buffer(write_pos[cpu_id],(void*)&time_delta, sizeof(uint32_t)); @@ -582,7 +588,7 @@ int main(int argc, char ** argv){ beat.cycle_count = start.cycle_count + beat_count * OVERFLOW_FIGURE; event_size = 0; - end.cycle_count += OVERFLOW_FIGURE; + // end.cycle_count += OVERFLOW_FIGURE; write_to_buffer(write_pos_intr,(void*)&newId, sizeof(uint16_t)); write_to_buffer(write_pos_intr,(void*)&timeDelta, sizeof(uint32_t));