GArray *fields; // Array of LttFields, for array, sequence, union, struct.
GData *fields_by_name;
GArray *fields; // Array of LttFields, for array, sequence, union, struct.
GData *fields_by_name;
int count; //the number of overflow of cycle count
gint64 overflow_nsec; //precalculated nsec for overflows
int count; //the number of overflow of cycle count
gint64 overflow_nsec; //precalculated nsec for overflows
// (it's variable), then the field_size should be
// dynamically calculated while reading the trace
// and put here. Otherwise, the field_size always
// (it's variable), then the field_size should be
// dynamically calculated while reading the trace
// and put here. Otherwise, the field_size always
off_t array_offset; // offset of the beginning of the array (for array
// and sequences)
GArray * dynamic_offsets; // array of offsets calculated dynamically at
off_t array_offset; // offset of the beginning of the array (for array
// and sequences)
GArray * dynamic_offsets; // array of offsets calculated dynamically at
GQuark long_name; //tracefile complete filename
GQuark name; //tracefile name
guint cpu_num; //cpu number of the tracefile
GQuark long_name; //tracefile complete filename
GQuark name; //tracefile name
guint cpu_num; //cpu number of the tracefile
+ guint tid; //Usertrace tid, else 0
+ guint pgid; //Usertrace pgid, else 0
+ guint64 creation; //Usertrace creation, else 0
LttTrace * trace; //trace containing the tracefile
int fd; //file descriptor
off_t file_size; //file size
LttTrace * trace; //trace containing the tracefile
int fd; //file descriptor
off_t file_size; //file 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 ?
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 has_alignment; //alignment of events in the tracefile.
- // 0 or the architecture size in bytes.
+ size_t has_alignment; //alignment of events in the tracefile.
+ // 0 or the architecture size in bytes.
//unsigned int count; //the number of overflow of cycle count
//double nsec_per_cycle; //Nsec per cycle
//TimeHeartbeat * last_heartbeat; //last heartbeat
//unsigned int count; //the number of overflow of cycle count
//double nsec_per_cycle; //Nsec per cycle
//TimeHeartbeat * last_heartbeat; //last heartbeat
/* Calculate the offset needed to align the type.
* If has_alignment is 0, alignment is disactivated.
* else, the function returns the offset needed to
* align align_drift on the has_alignment value (should be
* the size of the architecture). */
static inline unsigned int ltt_align(size_t align_drift,
/* Calculate the offset needed to align the type.
* If has_alignment is 0, alignment is disactivated.
* else, the function returns the offset needed to
* align align_drift on the has_alignment value (should be
* the size of the architecture). */
static inline unsigned int ltt_align(size_t align_drift,
- size_t alignment = min(has_alignment, size_of_type);
-
- if(!has_alignment) return 0;
-
- return ((alignment - align_drift) & (alignment-1));
+ size_t alignment = min(has_alignment, size_of_type);
+
+ if(!has_alignment) return 0;
+
+ g_assert(size_of_type != 0);
+ return ((alignment - align_drift) & (alignment-1));