Cleanup: reorganize ust-abi.h declarations
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Apr 2022 20:39:09 +0000 (16:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Jul 2024 15:39:51 +0000 (11:39 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifaab194b0cd11bf16270ef8809d87faa7894dfba

include/lttng/ust-abi.h

index 936d31c7948f454790dec8431ca49c5016672cc6..e9d77c74c324ddda39e7537dd2034cd9d7301e22 100644 (file)
@@ -76,50 +76,6 @@ struct lttng_ust_abi_stream {
         */
 } __attribute__((packed));
 
-#define LTTNG_UST_ABI_COUNTER_DIMENSION_MAX 4
-
-enum lttng_ust_abi_counter_arithmetic {
-       LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
-       LTTNG_UST_ABI_COUNTER_ARITHMETIC_SATURATION = 1,
-};
-
-enum lttng_ust_abi_counter_bitness {
-       LTTNG_UST_ABI_COUNTER_BITNESS_32 = 0,
-       LTTNG_UST_ABI_COUNTER_BITNESS_64 = 1,
-};
-
-enum lttng_ust_abi_counter_dimension_flags {
-       LTTNG_UST_ABI_COUNTER_DIMENSION_FLAG_UNDERFLOW = (1 << 0),
-       LTTNG_UST_ABI_COUNTER_DIMENSION_FLAG_OVERFLOW = (1 << 1),
-};
-
-struct lttng_ust_abi_counter_dimension {
-       uint32_t flags;                         /* enum lttng_ust_abi_counter_dimension_flags */
-       uint64_t size;                          /* dimension size */
-       uint64_t underflow_index;
-       uint64_t overflow_index;
-} __attribute__((packed));
-
-enum lttng_ust_abi_counter_conf_flags {
-       LTTNG_UST_ABI_COUNTER_CONF_FLAG_COALESCE_HITS = (1 << 0),
-};
-
-struct lttng_ust_abi_counter_conf {
-       uint32_t len;                           /* Length of fields before var. len. data. */
-       uint32_t flags;                         /* enum lttng_ust_abi_counter_conf_flags */
-       uint32_t arithmetic;                    /* enum lttng_ust_abi_counter_arithmetic */
-       uint32_t bitness;                       /* enum lttng_ust_abi_counter_bitness */
-       int64_t global_sum_step;
-       uint32_t number_dimensions;
-       uint32_t elem_len;                      /* array stride (size of lttng_ust_abi_counter_dimension) */
-} __attribute__((packed));
-
-struct lttng_ust_abi_counter_value {
-       uint32_t number_dimensions;
-       uint64_t dimension_indexes[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
-       int64_t value;
-} __attribute__((packed));
-
 #define LTTNG_UST_ABI_EVENT_PADDING1   8
 #define LTTNG_UST_ABI_EVENT_PADDING2   (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
 struct lttng_ust_abi_event {
@@ -151,22 +107,7 @@ struct lttng_ust_abi_event_notifier_notification {
        char padding[LTTNG_UST_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
 } __attribute__((packed));
 
-#define LTTNG_UST_ABI_COUNTER_DATA_MAX_LEN     4096U
-struct lttng_ust_abi_counter {
-       uint64_t len;
-       char data[];            /* variable sized data */
-} __attribute__((packed));
-
-struct lttng_ust_abi_counter_global {
-       uint32_t len;           /* Length of this structure */
-       uint64_t shm_len;       /* shm len */
-} __attribute__((packed));
-
-struct lttng_ust_abi_counter_cpu {
-       uint32_t len;           /* Length of this structure */
-       uint64_t shm_len;       /* shm len */
-       uint32_t cpu_nr;
-} __attribute__((packed));
+#define LTTNG_UST_ABI_COUNTER_DIMENSION_MAX 4
 
 enum lttng_ust_abi_key_token_type {
        LTTNG_UST_ABI_KEY_TOKEN_STRING = 0,             /* arg: strtab_offset. */
@@ -174,6 +115,16 @@ enum lttng_ust_abi_key_token_type {
        LTTNG_UST_ABI_KEY_TOKEN_PROVIDER_NAME = 2,      /* no arg. */
 };
 
+enum lttng_ust_abi_counter_arithmetic {
+       LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
+       LTTNG_UST_ABI_COUNTER_ARITHMETIC_SATURATION = 1,
+};
+
+enum lttng_ust_abi_counter_bitness {
+       LTTNG_UST_ABI_COUNTER_BITNESS_32 = 0,
+       LTTNG_UST_ABI_COUNTER_BITNESS_64 = 1,
+};
+
 #define LTTNG_UST_ABI_KEY_ARG_PADDING1         256
 #define LTTNG_UST_ABI_KEY_TOKEN_STRING_LEN_MAX 256
 struct lttng_ust_abi_key_token {
@@ -203,6 +154,55 @@ struct lttng_ust_abi_counter_event {
        char padding[LTTNG_UST_ABI_COUNTER_EVENT_PADDING1];
 } __attribute__((packed));
 
+enum lttng_ust_abi_counter_dimension_flags {
+       LTTNG_UST_ABI_COUNTER_DIMENSION_FLAG_UNDERFLOW = (1 << 0),
+       LTTNG_UST_ABI_COUNTER_DIMENSION_FLAG_OVERFLOW = (1 << 1),
+};
+
+struct lttng_ust_abi_counter_dimension {
+       uint32_t flags;                         /* enum lttng_ust_abi_counter_dimension_flags */
+       uint64_t size;                          /* dimension size */
+       uint64_t underflow_index;
+       uint64_t overflow_index;
+} __attribute__((packed));
+
+enum lttng_ust_abi_counter_conf_flags {
+       LTTNG_UST_ABI_COUNTER_CONF_FLAG_COALESCE_HITS = (1 << 0),
+};
+
+struct lttng_ust_abi_counter_conf {
+       uint32_t len;                           /* Length of fields before var. len. data. */
+       uint32_t flags;                         /* enum lttng_ust_abi_counter_conf_flags */
+       uint32_t arithmetic;                    /* enum lttng_ust_abi_counter_arithmetic */
+       uint32_t bitness;                       /* enum lttng_ust_abi_counter_bitness */
+       int64_t global_sum_step;
+       uint32_t number_dimensions;
+       uint32_t elem_len;                      /* array stride (size of lttng_ust_abi_counter_dimension) */
+} __attribute__((packed));
+
+struct lttng_ust_abi_counter_value {
+       uint32_t number_dimensions;
+       uint64_t dimension_indexes[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
+       int64_t value;
+} __attribute__((packed));
+
+#define LTTNG_UST_ABI_COUNTER_DATA_MAX_LEN     4096U
+struct lttng_ust_abi_counter {
+       uint64_t len;
+       char data[];            /* variable sized data */
+} __attribute__((packed));
+
+struct lttng_ust_abi_counter_global {
+       uint32_t len;           /* Length of this structure */
+       uint64_t shm_len;       /* shm len */
+} __attribute__((packed));
+
+struct lttng_ust_abi_counter_cpu {
+       uint32_t len;           /* Length of this structure */
+       uint64_t shm_len;       /* shm len */
+       uint32_t cpu_nr;
+} __attribute__((packed));
+
 enum lttng_ust_abi_field_type {
        LTTNG_UST_ABI_FIELD_OTHER                       = 0,
        LTTNG_UST_ABI_FIELD_INTEGER                     = 1,
This page took 0.026415 seconds and 4 git commands to generate.