git-svn-id: http://ltt.polymtl.ca/svn@239 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 24 Sep 2003 15:57:36 +0000 (15:57 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 24 Sep 2003 15:57:36 +0000 (15:57 +0000)
ltt/branches/poly/include/ltt/event.h
ltt/branches/poly/include/ltt/ltt-private.h
ltt/branches/poly/include/ltt/ltt.h
ltt/branches/poly/include/lttv/gtkTraceSet.h
ltt/branches/poly/include/lttv/gtkcustom.h

index 35e78778e1333f01329af9105e84549980f940a9..1ba598dfe62c8086ccfb64cbe14c9643dfec32fb 100644 (file)
@@ -44,7 +44,7 @@ LttCycleCount ltt_event_cycle_count(LttEvent *e);
 void ltt_event_position(LttEvent *e, LttEventPosition *ep);
 
 void ltt_event_position_get(LttEventPosition *ep,
-    unsigned *block_number, unsigned *index_in_block);
+    unsigned *block_number, unsigned *index_in_block, LttTracefile ** tf);
 
 void ltt_event_position_set(LttEventPosition *ep,
     unsigned block_number, unsigned index_in_block);
index 30400f5502a7c102e7306aa1c4201e318bde9d82..62f2383a5328869fe5f8409996375b2861c4a2b8 100644 (file)
@@ -134,6 +134,7 @@ struct _LttTracefile{
   void * buffer;                     //the buffer containing the block
   double cycle_per_nsec;             //Cycles per nsec
   unsigned cur_heart_beat_number;    //current number of heart beat in the buf
+  LttCycleCount cur_cycle_count;     //current cycle count of the event
 
   LttTime prev_block_end_time;       //the end time of previous block
   LttTime prev_event_time;           //the time of the previous event
@@ -161,6 +162,7 @@ struct _LttEventPosition{
   LttTime       event_time;         //the time of the event
   LttCycleCount event_cycle_count;  //the cycle count of the event
   unsigned      heart_beat_number;  //current number of heart beats  
+  LttTracefile *tf;                 //tracefile containing the event
   gboolean      old_position;       //flag to show if it is the position
                                     //being remembered
 };
index 296c82218b3462e27fd6407c80f29aee464ab997..74cbacebacbf6d3686e0117e179b421cb6d0473a 100644 (file)
@@ -82,6 +82,8 @@ typedef struct _LttTime {
 
 typedef uint64_t LttCycleCount;
 
+#define NANSECOND_CONST       1000000000
+
 /* Event positions are used to seek within a tracefile based on
    the block number and event position within the block. */
 
@@ -108,11 +110,14 @@ typedef enum _LttArchEndian
 do \
 {\
   (T3).tv_sec  = (T2).tv_sec  - (T1).tv_sec;  \
-  (T3).tv_nsec = (T2).tv_nsec - (T1).tv_nsec; \
-  if((T3).tv_nsec < 0)\
+  if((T2).tv_nsec < (T1).tv_nsec)\
     {\
     (T3).tv_sec--;\
-    (T3).tv_nsec += 1000000000;\
+    (T3).tv_nsec = NANSECOND_CONST - (T1).tv_nsec + (T2).tv_nsec;\
+    }\
+  else\
+    {\
+    (T3).tv_nsec = (T2).tv_nsec - (T1).tv_nsec;\
     }\
 } while(0)
 
@@ -122,10 +127,10 @@ do \
 {\
   (T3).tv_sec  = (T2).tv_sec  + (T1).tv_sec;  \
   (T3).tv_nsec = (T2).tv_nsec + (T1).tv_nsec; \
-  if((T3).tv_nsec >= 1000000000)\
+  if((T3).tv_nsec >= NANSECOND_CONST)\
     {\
-    (T3).tv_sec += (T3).tv_nsec / 1000000000;\
-    (T3).tv_nsec = (T3).tv_nsec % 1000000000;\
+    (T3).tv_sec += (T3).tv_nsec / NANSECOND_CONST;\
+    (T3).tv_nsec = (T3).tv_nsec % NANSECOND_CONST;\
     }\
 } while(0)
 
@@ -138,10 +143,10 @@ do \
 {\
   (T2).tv_sec  = (T1).tv_sec  * (FLOAT);  \
   (T2).tv_nsec = (T1).tv_nsec * (FLOAT);  \
-  if((T2).tv_nsec >= 1000000000)\
+  if((T2).tv_nsec >= NANSECOND_CONST)\
     {\
-    (T2).tv_sec += (T2).tv_nsec / 1000000000;\
-    (T2).tv_nsec = (T2).tv_nsec % 1000000000;\
+    (T2).tv_sec += (T2).tv_nsec / NANSECOND_CONST;\
+    (T2).tv_nsec = (T2).tv_nsec % NANSECOND_CONST;\
     }\
 } while(0)
 
index f1680abbc05060433da858d9225c9fecd115830a..62aaf2ad4f8f75e0685fe9702cc7ac62723981e2 100644 (file)
@@ -370,3 +370,11 @@ void contextRemoveHooks(mainWindow *main_win ,
                        LttvHooks *after_event);
 
 
+/**
+ * Function to get the life span of the traceset
+ * @param main_win the main window the viewer belongs to.
+ * @param start start time of the traceset.
+ * @param end end time of the traceset.
+ */
+
+void getTracesetTimeSpan(mainWindow *main_win, LttTime * start, LttTime* end);
index 2bd174bb9a604d2adb544fd4b4f9bf3134a225e2..f0d20f23567cf9846a16abe63b514ecbc931c3f6 100644 (file)
@@ -39,6 +39,7 @@ struct _GtkCustom
   //  GtkWidget * scrollWindow;
   //  GtkWidget * viewport;
   GtkWidget * hScrollbar;  
+  GtkAdjustment *hAdjust;
 };
 
 struct _GtkCustomClass
This page took 0.026824 seconds and 4 git commands to generate.