- unsigned block_size; //block_size
- unsigned int block_number; //number of blocks in the file
- unsigned int which_block; //which block the current block is
- unsigned int which_event; //which event of the current block
- //is currently processed
- LttTime current_event_time; //time of the current event
- BlockStart * a_block_start; //block start of the block
- BlockEnd * a_block_end; //block end of the block
- void * cur_event_pos; //the position of the current event
- 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
- void * last_event_pos;
-
- LttTime prev_block_end_time; //the end time of previous block
- LttTime prev_event_time; //the time of the previous event
- LttCycleCount pre_cycle_count; //previous cycle count of the event
- unsigned int count; //the number of overflow of cycle count
-};
-
-struct _LttTrace{
- char * pathname; //the pathname of the trace
- guint facility_number; //the number of facilities
- 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
- LttArchSize my_arch_size; //data size of the local machine
- 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
- LttTracefile *tf; //tracefile containing the event
- gboolean old_position; //flag to show if it is the position
- //being remembered
- /* This is a workaround for fast position seek */
- void * last_event_pos;
-
- LttTime prev_block_end_time; //the end time of previous block
- LttTime prev_event_time; //the time of the previous event
- LttCycleCount pre_cycle_count; //previous cycle count of the event
- int count; //the number of overflow of cycle count
- /* end of workaround */
+ //unsigned block_size; //block_size
+ guint num_blocks; //number of blocks in the file
+ gboolean reverse_bo; //must we reverse byte order ?
+ gboolean float_word_order; //what is the byte order of floats ?
+ size_t alignment; //alignment of events in the tracefile.
+ // 0 or the architecture size in bytes.
+
+ guint8 has_heartbeat;
+ size_t buffer_header_size;
+ int compact; //compact tracefile ?
+ uint8_t tsc_lsb_truncate;
+ uint8_t tscbits;
+ uint8_t tsc_msb_cutoff;
+ uint8_t compact_event_bits;
+ uint64_t tsc_mask;
+ uint64_t tsc_mask_next_bit; //next MSB after the mask
+
+ /* Current event */
+ LttEvent event; //Event currently accessible in the trace
+
+ /* Current block */
+ LttBuffer buffer; //current buffer
+ guint32 buf_size; /* The size of blocks */
+
+ /* Time flow */
+ //unsigned int count; //the number of overflow of cycle count
+ //double nsec_per_cycle; //Nsec per cycle
+ //TimeHeartbeat * last_heartbeat; //last heartbeat
+
+ //LttCycleCount cycles_per_nsec_reciprocal; // Optimisation for speed
+ //void * last_event_pos;
+
+ //LttTime prev_block_end_time; //the end time of previous block
+ //LttTime prev_event_time; //the time of the previous event
+ //LttCycleCount pre_cycle_count; //previous cycle count of the event