Fix: add packed attribute to filter structure
authorDavid Goulet <dgoulet@efficios.com>
Thu, 13 Dec 2012 21:41:57 +0000 (16:41 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 13 Dec 2012 21:43:20 +0000 (16:43 -0500)
Also fix the internal UST abi by swapping two variables and fit the
upstream UST abi.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/lttng-ust-abi.h
src/lib/lttng-ctl/filter/filter-bytecode.h

index 0a80abe3096f615526731706701ad5312d6f02f4..81143504e334b92783566386af4d87ec3e8a9ecc 100644 (file)
@@ -56,9 +56,9 @@ struct lttng_ust_tracer_version {
 
 #define LTTNG_UST_CHANNEL_PADDING      LTTNG_UST_SYM_NAME_LEN + 32
 struct lttng_ust_channel {
-       int overwrite;                          /* 1: overwrite, 0: discard */
        uint64_t subbuf_size;                   /* in bytes */
        uint64_t num_subbuf;
+       int overwrite;                          /* 1: overwrite, 0: discard */
        unsigned int switch_timer_interval;     /* usecs */
        unsigned int read_timer_interval;       /* usecs */
        enum lttng_ust_output output;           /* output mode */
@@ -132,9 +132,9 @@ struct lttng_ust_context {
  */
 #define LTTNG_UST_CHANNEL_ATTR_PADDING LTTNG_UST_SYM_NAME_LEN + 32
 struct lttng_ust_channel_attr {
-       int overwrite;                          /* 1: overwrite, 0: discard */
        uint64_t subbuf_size;                   /* bytes */
        uint64_t num_subbuf;                    /* power of 2 */
+       int overwrite;                          /* 1: overwrite, 0: discard */
        unsigned int switch_timer_interval;     /* usec */
        unsigned int read_timer_interval;       /* usec */
        enum lttng_ust_output output;           /* splice, mmap */
index 06dace84c7dbadc514763bf472502a21248ae2c4..786174484d509d1f432ddeca902c45be59420740 100644 (file)
 struct field_ref {
        /* Initially, symbol offset. After link, field offset. */
        uint16_t offset;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_numeric {
        int64_t v;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_double {
        double v;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct literal_string {
        char string[0];
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 enum filter_op {
        FILTER_OP_UNKNOWN                       = 0,
@@ -151,29 +151,29 @@ struct load_op {
        filter_opcode_t op;
        char data[0];
        /* data to load. Size known by enum filter_opcode and null-term char. */
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct binary_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct unary_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 /* skip_offset is absolute from start of bytecode */
 struct logical_op {
        filter_opcode_t op;
        uint16_t skip_offset;   /* bytecode insn, if skip second test */
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct cast_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct return_op {
        filter_opcode_t op;
-} __attribute__((packed));
+} LTTNG_PACKED;
 
 struct lttng_filter_bytecode_alloc {
        uint32_t alloc_len;
This page took 0.040848 seconds and 4 git commands to generate.