projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
roadmap update
[lttv.git]
/
ltt
/
branches
/
poly
/
ltt
/
ltt-private.h
diff --git
a/ltt/branches/poly/ltt/ltt-private.h
b/ltt/branches/poly/ltt/ltt-private.h
index 03da264e64cd64e97ccbf21ca7c893972b816ce7..d97ff5fce9ec871c5b24a4deae2efbc0ac3c2313 100644
(file)
--- a/
ltt/branches/poly/ltt/ltt-private.h
+++ b/
ltt/branches/poly/ltt/ltt-private.h
@@
-29,6
+29,11
@@
#define max(a,b) ((a)>(b)?(a):(b))
#endif
#define max(a,b) ((a)>(b)?(a):(b))
#endif
+#ifndef min
+#define min(a,b) ((a)<(b)?(a):(b))
+#endif
+
+
#define LTT_MAGIC_NUMBER 0x00D6B7ED
#define LTT_REV_MAGIC_NUMBER 0xEDB7D600
#define LTT_MAGIC_NUMBER 0x00D6B7ED
#define LTT_REV_MAGIC_NUMBER 0xEDB7D600
@@
-174,9
+179,9
@@
struct ltt_trace_header_0_3 {
uint8_t has_tsc;
} LTT_PACKED_STRUCT;
uint8_t has_tsc;
} LTT_PACKED_STRUCT;
-/* For version 0.
4
*/
+/* For version 0.
6
*/
-struct ltt_trace_header_0_
4
{
+struct ltt_trace_header_0_
6
{
uint32_t magic_number;
uint32_t arch_type;
uint32_t arch_variant;
uint32_t magic_number;
uint32_t arch_type;
uint32_t arch_variant;
@@
-187,22
+192,28
@@
struct ltt_trace_header_0_4 {
uint8_t flight_recorder;
uint8_t has_heartbeat;
uint8_t has_alignment; /* Event header alignment */
uint8_t flight_recorder;
uint8_t has_heartbeat;
uint8_t has_alignment; /* Event header alignment */
-
uint8_t has_tsc;
+ uint8_t has_tsc;
uint64_t start_freq;
uint64_t start_tsc;
uint64_t start_monotonic;
uint64_t start_freq;
uint64_t start_tsc;
uint64_t start_monotonic;
- struct timeval start_time;
+ //struct timespec start_time; // not portable
+ uint64_t start_time_sec;
+ uint64_t start_time_usec;
} LTT_PACKED_STRUCT;
struct ltt_block_start_header {
struct {
} LTT_PACKED_STRUCT;
struct ltt_block_start_header {
struct {
- struct timeval timestamp;
+ //struct timeval timestamp;
+ uint64_t timestamp_sec;
+ uint64_t timestamp_usec;
uint64_t cycle_count;
uint64_t freq;
} begin;
struct {
uint64_t cycle_count;
uint64_t freq;
} begin;
struct {
- struct timeval timestamp;
+ //struct timeval timestamp;
+ uint64_t timestamp_sec;
+ uint64_t timestamp_usec;
uint64_t cycle_count;
uint64_t freq;
} end;
uint64_t cycle_count;
uint64_t freq;
} end;
@@
-218,7
+229,7
@@
struct _LttType{
gchar * fmt;
guint size;
LttTypeEnum type_class; //which type
gchar * fmt;
guint size;
LttTypeEnum type_class; //which type
- G
Data
*enum_map; //maps enum labels to numbers.
+ G
HashTable
*enum_map; //maps enum labels to numbers.
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;
};
@@
-445,11
+456,11
@@
static inline unsigned int ltt_align(size_t align_drift,
size_t has_alignment)
{
size_t alignment = min(has_alignment, size_of_type);
size_t has_alignment)
{
size_t alignment = min(has_alignment, size_of_type);
-
+
+ if(!has_alignment) return 0;
+
return ((alignment - align_drift) & (alignment-1));
}
return ((alignment - align_drift) & (alignment-1));
}
-off_t field_align(LttTracefile *tf, LttField *field, off_t offset);
-
#endif /* LTT_PRIVATE_H */
#endif /* LTT_PRIVATE_H */
This page took
0.024189 seconds
and
4
git commands to generate.