X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fltt-private.h;h=05c18c0ffdb3bc472eadb85fba22e635d2d1ac81;hb=45e14832eebe9f25938b2c668d8ef1acd56a2436;hp=6e9e3e48af80d22659573a730675a6fbfed15bfd;hpb=c02ea99f196ff9bf99335fcf0cae4efc0e28f051;p=lttv.git diff --git a/ltt/branches/poly/ltt/ltt-private.h b/ltt/branches/poly/ltt/ltt-private.h index 6e9e3e48..05c18c0f 100644 --- a/ltt/branches/poly/ltt/ltt-private.h +++ b/ltt/branches/poly/ltt/ltt-private.h @@ -38,7 +38,7 @@ typedef enum _BuildinEvent{ /* structure definition */ typedef struct _FacilityLoad{ - char * name; + gchar * name; LttChecksum checksum; guint32 base_code; } LTT_PACKED_STRUCT FacilityLoad; @@ -62,25 +62,25 @@ typedef struct _TimeHeartbeat { struct _LttType{ - char * type_name; //type name if it is a named type - char * element_name; //elements name of the struct - char * fmt; - int size; + gchar * type_name; //type name if it is a named type + gchar * element_name; //elements name of the struct + gchar * fmt; + unsigned int size; LttTypeEnum type_class; //which type - char ** enum_strings; //for enum labels + gchar ** enum_strings; //for enum labels struct _LttType ** element_type; //for array, sequence and struct unsigned element_number; //the number of elements //for enum, array, sequence and structure }; struct _LttEventType{ - char * name; - char * description; + gchar * name; + gchar * description; int index; //id of the event type within the facility LttFacility * facility; //the facility that contains the event type LttField * root_field; //root field - int latest_block; //the latest block using the event type - int latest_event; //the latest event using the event type + unsigned int latest_block; //the latest block using the event type + unsigned int latest_event; //the latest event using the event type }; struct _LttEvent{ @@ -90,8 +90,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 + unsigned int which_block; //the current block of the event + unsigned int which_event; //the position of the event /* This is a workaround for fast position seek */ void * last_event_pos; @@ -99,6 +99,9 @@ struct _LttEvent{ 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 + gint64 overflow_nsec; //precalculated nsec for overflows + TimeHeartbeat * last_heartbeat; //last heartbeat + /* end of workaround */ }; @@ -136,31 +139,39 @@ struct _LttField{ struct _LttFacility{ - char * name; //facility name - int event_number; //number of events in the facility + gchar * name; //facility name + unsigned int event_number; //number of events in the facility LttChecksum checksum; //checksum of the facility guint32 base_id; //base id of the facility LttEventType ** events; //array of event types LttType ** named_types; - int named_types_number; + unsigned int named_types_number; }; struct _LttTracefile{ - char * name; //tracefile name + gchar * name; //tracefile name LttTrace * trace; //trace containing the tracefile int fd; //file descriptor off_t file_size; //file size unsigned block_size; //block_size - int block_number; //number of blocks in the file - int which_block; //which block the current block is - int which_event; //which event of the current block + 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 + BlockStart * a_block_start; //block start of the block- trace endian + BlockEnd * a_block_end; //block end of the block - trace endian + TimeHeartbeat * last_heartbeat; //last heartbeat void * cur_event_pos; //the position of the current event void * buffer; //the buffer containing the block - double cycle_per_nsec; //Cycles per nsec + double nsec_per_cycle; //Nsec per cycle + guint64 one_overflow_nsec; //nsec for one overflow + gint64 overflow_nsec; //precalculated nsec for overflows + //can be negative to include value + //of block start cycle count. + //incremented at each overflow while + //reading. + //LttCycleCount cycles_per_nsec_reciprocal; // Optimisation for speed 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; @@ -168,11 +179,11 @@ struct _LttTracefile{ 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 + unsigned int count; //the number of overflow of cycle count }; struct _LttTrace{ - char * pathname; //the pathname of the trace + gchar * 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 @@ -181,8 +192,7 @@ struct _LttTrace{ 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 + gboolean reverse_byte_order; //must we reverse BO ? }; struct _LttEventPosition{ @@ -202,6 +212,8 @@ struct _LttEventPosition{ 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 + gint64 overflow_nsec; //precalculated nsec for overflows + TimeHeartbeat * last_heartbeat; //last heartbeat /* end of workaround */ }; @@ -209,19 +221,19 @@ struct _LttEventPosition{ is described in a LttSystemDescription structure. */ struct _LttSystemDescription { - char *description; - char *node_name; - char *domain_name; + gchar *description; + gchar *node_name; + gchar *domain_name; unsigned nb_cpu; LttArchSize size; LttArchEndian endian; - char *kernel_name; - char *kernel_release; - char *kernel_version; - char *machine; - char *processor; - char *hardware_platform; - char *operating_system; + gchar *kernel_name; + gchar *kernel_release; + gchar *kernel_version; + gchar *machine; + gchar *processor; + gchar *hardware_platform; + gchar *operating_system; unsigned ltt_major_version; unsigned ltt_minor_version; unsigned ltt_block_size;