new function to get the time span of a trace
[lttv.git] / ltt / branches / poly / include / ltt / ltt-private.h
index 7dea83d98f6d21ff8d2a6cb186f9ccb5d1f8716c..30400f5502a7c102e7306aa1c4201e318bde9d82 100644 (file)
@@ -13,7 +13,7 @@ typedef enum _BuildinEvent{
   TRACE_FACILITY_LOAD = 0,
   TRACE_BLOCK_START   = 17,
   TRACE_BLOCK_END     = 18,
-  TRACE_TIME_HEARTBEAT= 22
+  TRACE_TIME_HEARTBEAT= 19
 } BuildinEvent;
 
 
@@ -44,7 +44,8 @@ typedef struct _TimeHeartbeat {
 
 
 struct _LttType{
-  char * element_name;             //elements name of the struct or type name
+  char * type_name;                //type name if it is a named type
+  char * element_name;             //elements name of the struct
   char * fmt;
   int size;
   LttTypeEnum type_class;          //which type
@@ -80,6 +81,9 @@ struct _LttField{
   int  field_size;           //>0: size of the field, 
                              //0 : uncertain
                              //-1: uninitialize
+  int sequ_number_size;      //the size of unsigned used to save the
+                             //number of elements in the sequence
+
   int element_size;          //the element size of the sequence
   int field_fixed;           //0: field has string or sequence
                              //1: field has no string or sequenc
@@ -99,6 +103,8 @@ struct _LttEvent{
   LttCycleCount event_cycle_count;
   LttTracefile * tracefile;
   void * data;               //event data
+  int which_block;           //the current block of the event
+  int which_event;           //the position of the event
 };
 
 struct _LttFacility{
@@ -131,6 +137,7 @@ struct _LttTracefile{
 
   LttTime prev_block_end_time;       //the end time of previous block
   LttTime prev_event_time;           //the time of the previous event
+  LttEvent an_event;
 };
 
 struct _LttTrace{
@@ -139,6 +146,7 @@ struct _LttTrace{
   guint control_tracefile_number;           //the number of control files 
   guint per_cpu_tracefile_number;           //the number of per cpu files 
   LttSystemDescription * system_description;//system description 
+
   GPtrArray *control_tracefiles;            //array of control tracefiles 
   GPtrArray *per_cpu_tracefiles;            //array of per cpu tracefiles 
   GPtrArray *facilities;                    //array of facilities 
@@ -146,6 +154,16 @@ struct _LttTrace{
   LttArchEndian my_arch_endian;             //endian type of the local machine
 };
 
+struct _LttEventPosition{
+  unsigned      block_num;          //block which contains the event 
+  unsigned      event_num;          //event index in the block
+  unsigned      event_offset;       //event position in the block
+  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  
+  gboolean      old_position;       //flag to show if it is the position
+                                    //being remembered
+};
 
 /*****************************************************************************
  macro for size of some data types
@@ -163,6 +181,9 @@ LttTime getEventTime(LttTracefile * tf);
 /* get the data type size and endian type of the local machine */
 void getDataEndianType(LttArchSize * size, LttArchEndian * endian);
 
+/* get an integer number */
+int getIntNumber(int size1, void *evD);
+
 /* open facility */
 void ltt_facility_open(LttTrace * t, char * facility_name);
 
This page took 0.025416 seconds and 4 git commands to generate.