projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a module to distribute messages to many analysis modules
[lttv.git]
/
ltt
/
ltt-private.h
diff --git
a/ltt/ltt-private.h
b/ltt/ltt-private.h
index 797c57ca183e1c8b403ccd2ccc08115255b26843..5f7919726b6c51300c5f7217ab87c6366bb22045 100644
(file)
--- a/
ltt/ltt-private.h
+++ b/
ltt/ltt-private.h
@@
-66,7
+66,7
@@
typedef guint32 uint32_t;
typedef guint64 uint64_t;
/* Subbuffer header */
typedef guint64 uint64_t;
/* Subbuffer header */
-struct ltt_subbuffer_header_2_
3
{
+struct ltt_subbuffer_header_2_
5
{
uint64_t cycle_count_begin; /* Cycle count at subbuffer start */
uint64_t cycle_count_end; /* Cycle count at subbuffer end */
uint32_t magic_number; /*
uint64_t cycle_count_begin; /* Cycle count at subbuffer start */
uint64_t cycle_count_end; /* Cycle count at subbuffer end */
uint32_t magic_number; /*
@@
-84,8
+84,8
@@
struct ltt_subbuffer_header_2_3 {
* used all along the trace.
*/
uint32_t freq_scale; /* Frequency scaling (divide freq) */
* used all along the trace.
*/
uint32_t freq_scale; /* Frequency scaling (divide freq) */
- uint32_t
lost_size; /* Size unused at end of
subbuffer */
- uint32_t
buf_size; /* Size of this subbuffer
*/
+ uint32_t
data_size; /* Size of data in
subbuffer */
+ uint32_t
sb_size; /* Subbuffer size (page aligned)
*/
uint32_t events_lost; /*
* Events lost in this subbuffer since
* the beginning of the trace.
uint32_t events_lost; /*
* Events lost in this subbuffer since
* the beginning of the trace.
@@
-99,7
+99,7
@@
struct ltt_subbuffer_header_2_3 {
char header_end[0]; /* End of header */
};
char header_end[0]; /* End of header */
};
-typedef struct ltt_subbuffer_header_2_
3
ltt_subbuffer_header_t;
+typedef struct ltt_subbuffer_header_2_
5
ltt_subbuffer_header_t;
/*
* Return header size without padding after the structure. Don't use packed
/*
* Return header size without padding after the structure. Don't use packed
@@
-115,7
+115,10
@@
enum field_status { FIELD_UNKNOWN, FIELD_VARIABLE, FIELD_FIXED };
typedef struct _LttBuffer {
void * head;
typedef struct _LttBuffer {
void * head;
+ guint64 offset; /* Offset of the current subbuffer */
+ guint32 size; /* The size of the current subbuffer */
unsigned int index;
unsigned int index;
+ uint32_t data_size; /* Size of data in the subbuffer */
struct {
LttTime timestamp;
struct {
LttTime timestamp;
@@
-127,7
+130,6
@@
typedef struct _LttBuffer {
uint64_t cycle_count;
uint64_t freq; /* Frequency in khz */
} end;
uint64_t cycle_count;
uint64_t freq; /* Frequency in khz */
} end;
- uint32_t lost_size; /* Size unused at the end of the buffer */
/* Timekeeping */
uint64_t tsc; /* Current timestamp counter */
/* Timekeeping */
uint64_t tsc; /* Current timestamp counter */
@@
-162,12
+164,13
@@
struct LttTracefile {
uint32_t events_lost;
uint32_t subbuf_corrupt;
uint32_t events_lost;
uint32_t subbuf_corrupt;
+ GArray *buf_index; /* index mapping buffer index to offset */
+
/* Current event */
LttEvent event; //Event currently accessible in the trace
/* Current block */
LttBuffer buffer; //current buffer
/* Current event */
LttEvent event; //Event currently accessible in the trace
/* Current block */
LttBuffer buffer; //current buffer
- guint32 buf_size; /* The size of blocks */
};
/* The characteristics of the system on which the trace was obtained
};
/* The characteristics of the system on which the trace was obtained
@@
-191,22
+194,25
@@
struct LttSystemDescription {
LttTime trace_end;
};
LttTime trace_end;
};
-/* Calculate the offset needed to align the type.
+/*
+ * Calculate the offset needed to align the type.
* If alignment is 0, alignment is disactivated.
* else, the function returns the offset needed to
* If alignment is 0, alignment is disactivated.
* else, the function returns the offset needed to
- * align align_drift on the alignment value (should be
- * the size of the architecture). */
+ * align align_drift on the alignment value.
+ *
+ * Do not limit alignment on architecture size anymore,
+ * because uint64_t types are aligned on 64-bit even
+ * on 32-bit archs.
+ */
static inline unsigned int ltt_align(size_t align_drift,
size_t size_of_type,
size_t alignment)
{
static inline unsigned int ltt_align(size_t align_drift,
size_t size_of_type,
size_t alignment)
{
- size_t align_offset = min(alignment, size_of_type);
-
if(!alignment)
return 0;
g_assert(size_of_type != 0);
if(!alignment)
return 0;
g_assert(size_of_type != 0);
- return ((
align_offset - align_drift) & (align_offset-
1));
+ return ((
size_of_type - align_drift) & (size_of_type -
1));
}
}
This page took
0.02385 seconds
and
4
git commands to generate.