float word order
[lttv.git] / ltt / branches / poly / ltt / ltt-private.h
index 4040433df432cae199464a2f467b1da30c0dfb15..bcd745ca5d917a1f8e29eaf8b953b467c1ec09b6 100644 (file)
@@ -22,6 +22,7 @@
 #include <glib.h>
 #include <sys/types.h>
 #include <ltt/ltt.h>
+#include <endian.h>
 
 
 #ifndef max
 
 /* Hardcoded facilities */
 #define LTT_FACILITY_CORE 0
+/* Byte ordering */
+#define LTT_GET_BO(t) ((t)->reverse_bo)
+
+#define LTT_HAS_FLOAT(t) ((t)->float_word_order!=0)
+#define LTT_GET_FLOAT_BO(t) \
+  (((t)->float_word_order==__BYTE_ORDER)?0:1)
+
 
 /* Hardcoded core events */
 enum ltt_core_events {
@@ -132,6 +141,7 @@ struct ltt_trace_header {
   uint32_t        magic_number;
   uint32_t        arch_type;
   uint32_t        arch_variant;
+  uint32_t        float_word_order;
   uint8_t         arch_size;
   //uint32_t        system_type;
   uint8_t          major_version;
@@ -317,6 +327,7 @@ struct _LttTracefile{
   //unsigned block_size;               //block_size
   unsigned int 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 ?
 
        /* Current event */
   LttEvent event;                    //Event currently accessible in the trace
@@ -345,7 +356,8 @@ struct _LttTrace{
   GArray *facilities_by_num;            /* fac_id as index in array */
   GData *facilities_by_name;            /* fac name (GQuark) as index */
                                         /* Points to array of fac_id of all the
-                                         * facilities that has this name. */
+                                        * facilities that has this name. */
+  guint     num_cpu;
 
   guint32   arch_type;
   guint32   arch_variant;
@@ -390,7 +402,5 @@ struct _LttSystemDescription {
 //#define EVENT_ID_SIZE     sizeof(guint16)
 //#define EVENT_HEADER_SIZE (TIMESTAMP_SIZE + EVENT_ID_SIZE)
 
-#define LTT_GET_BO(t) ((t)->reverse_bo)
-
 
 #endif /* LTT_PRIVATE_H */
This page took 0.023923 seconds and 4 git commands to generate.