Rework about dialog by using gtk_show_about_dialog
[lttv.git] / ltt / ltt-private.h
index 5f7919726b6c51300c5f7217ab87c6366bb22045..593ce4413b44cf6e98ed930275a208f0711a95bf 100644 (file)
@@ -66,7 +66,7 @@ typedef guint32 uint32_t;
 typedef guint64 uint64_t;
 
 /* Subbuffer header */
-struct ltt_subbuffer_header_2_5 {
+struct ltt_subbuffer_header_2_6 {
        uint64_t cycle_count_begin;     /* Cycle count at subbuffer start */
        uint64_t cycle_count_end;       /* Cycle count at subbuffer end */
        uint32_t magic_number;          /*
@@ -99,7 +99,7 @@ struct ltt_subbuffer_header_2_5 {
        char header_end[0];             /* End of header */
 };
 
-typedef struct ltt_subbuffer_header_2_5 ltt_subbuffer_header_t;
+typedef struct ltt_subbuffer_header_2_6 ltt_subbuffer_header_t;
 
 /*
  * Return header size without padding after the structure. Don't use packed
@@ -165,7 +165,7 @@ struct LttTracefile {
   uint32_t  subbuf_corrupt;
 
   GArray *buf_index;                 /* index mapping buffer index to offset */
-
+       uint64_t end_timestamp; /* Last timestamp of file */
   /* Current event */
   LttEvent event;                    //Event currently accessible in the trace
 
@@ -196,23 +196,24 @@ struct LttSystemDescription {
 
 /*
  * Calculate the offset needed to align the type.
- * If alignment is 0, alignment is disactivated.
+ * If alignment is 0, alignment is deactivated.
  * else, the function returns the offset needed to
  * 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.
+ * align align_drift on the alignment value (should be
+ * the size of the architecture).
  */
 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);
-  return ((size_of_type - align_drift) & (size_of_type - 1));
+  return ((align_offset - align_drift) & (align_offset-1));
 }
 
 
This page took 0.023098 seconds and 4 git commands to generate.