uh-ohhhh, heartbeat doesn't happen at least once per overflow. Check overflow at...
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 17 Aug 2004 15:44:26 +0000 (15:44 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 17 Aug 2004 15:44:26 +0000 (15:44 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@801 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/convert/convert.c

index a13daaf2a8b05b33da7cfe445d1312759889e119..58957f4d725bc3d0ca245d68b3f98b6512a14898 100644 (file)
@@ -480,8 +480,20 @@ int main(int argc, char ** argv){
        //write event_id and time_delta
        write_to_buffer(write_pos,(void*)&newId,sizeof(uint16_t));
        write_to_buffer(write_pos,(void*)&time_delta, sizeof(uint32_t));     
-       
+
+  /* Fix (Mathieu) */
+  if(time_delta < (0xFFFFFFFFULL&adaptation_tsc)) {
+    /* Overflow */
+    adaptation_tsc = (adaptation_tsc&0xFFFFFFFF00000000ULL) + 0x100000000ULL 
+                                 + (uint64_t)time_delta;
+  } else {
+    /* No overflow */
+    adaptation_tsc = (adaptation_tsc&0xFFFFFFFF00000000ULL) + time_delta;
+  }
+
+
        if(evId == TRACE_BUFFER_END){
+#if 0
     /* Fix (Mathieu) */
     if(time_delta < (0xFFFFFFFFULL&adaptation_tsc)) {
       /* Overflow */
@@ -491,7 +503,7 @@ int main(int argc, char ** argv){
       /* No overflow */
       adaptation_tsc = (adaptation_tsc&0xFFFFFFFF00000000ULL) + time_delta;
     }
-
+#endif //0
     end.cycle_count = adaptation_tsc;
          int size = (void*)buf_out + block_size - write_pos 
                    - sizeof(buffer_end) - sizeof(uint32_t);
@@ -609,16 +621,6 @@ int main(int argc, char ** argv){
            event_size = sizeof(trace_network);
            break;
          case TRACE_HEARTBEAT:
-      /* Fix (Mathieu) */
-      if(time_delta < (0xFFFFFFFFULL&adaptation_tsc)) {
-        /* Overflow */
-       adaptation_tsc = (adaptation_tsc&0xFFFFFFFF00000000ULL) + 0x100000000ULL 
-                                     + (uint64_t)time_delta;
-      } else {
-        /* No overflow */
-        adaptation_tsc = (adaptation_tsc&0xFFFFFFFF00000000ULL) + time_delta;
-      }
-
            beat.seconds = 0;
            beat.nanoseconds = 0;
            beat.cycle_count = adaptation_tsc;
This page took 0.033087 seconds and 4 git commands to generate.