From: Jérémie Galarneau Date: Fri, 30 Aug 2024 20:37:20 +0000 (-0400) Subject: clang-format: run clang-format on the tree X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d425df617976eb439b6aff4e8d32c0c8e7e13bb6;p=lttng-tools.git clang-format: run clang-format on the tree Signed-off-by: Jérémie Galarneau Change-Id: I45c2a1f375e5b19b649ee5d11fb299ccd77c6845 --- diff --git a/include/lttng/health-internal.hpp b/include/lttng/health-internal.hpp index ac260dcf8..eee164cb1 100644 --- a/include/lttng/health-internal.hpp +++ b/include/lttng/health-internal.hpp @@ -26,7 +26,7 @@ #define HEALTH_POLL_VALUE (1UL << 0) #define HEALTH_CODE_VALUE (1UL << 1) -#define HEALTH_IS_IN_POLL(x) ((x) & HEALTH_POLL_VALUE) +#define HEALTH_IS_IN_POLL(x) ((x) &HEALTH_POLL_VALUE) struct health_app; diff --git a/src/bin/lttng-crash/lttng-crash.cpp b/src/bin/lttng-crash/lttng-crash.cpp index 51b970e43..283bd0ec0 100644 --- a/src/bin/lttng-crash/lttng-crash.cpp +++ b/src/bin/lttng-crash/lttng-crash.cpp @@ -72,7 +72,7 @@ enum lttng_crash_type { /* LTTng ring buffer defines (copied) */ -#define HALF_ULONG_BITS(wl) (((wl) * CHAR_BIT) >> 1) +#define HALF_ULONG_BITS(wl) (((wl) *CHAR_BIT) >> 1) #define SB_ID_OFFSET_SHIFT(wl) (HALF_ULONG_BITS(wl) + 1) #define SB_ID_OFFSET_COUNT(wl) (1UL << SB_ID_OFFSET_SHIFT(wl)) diff --git a/src/bin/lttng-relayd/index.cpp b/src/bin/lttng-relayd/index.cpp index a90798254..cb27441c1 100644 --- a/src/bin/lttng-relayd/index.cpp +++ b/src/bin/lttng-relayd/index.cpp @@ -75,7 +75,8 @@ static struct relay_index *relay_index_add_unique(struct relay_stream *stream, index->index_n.key); node_ptr = cds_lfht_add_unique(stream->indexes_ht->ht, - stream->indexes_ht->hash_fct(&index->index_n.key, lttng_ht_seed), + stream->indexes_ht->hash_fct(&index->index_n.key, + lttng_ht_seed), stream->indexes_ht->match_fct, &index->index_n.key, &index->index_n.node); diff --git a/src/bin/lttng-sessiond/ust-abi-internal.hpp b/src/bin/lttng-sessiond/ust-abi-internal.hpp index 474dfd6f1..1b042dcaa 100644 --- a/src/bin/lttng-sessiond/ust-abi-internal.hpp +++ b/src/bin/lttng-sessiond/ust-abi-internal.hpp @@ -22,7 +22,7 @@ #ifndef lttng_ust_stringify #define lttng_ust_stringify1(x) #x -#define lttng_ust_stringify(x) lttng_ust_stringify1(x) +#define lttng_ust_stringify(x) lttng_ust_stringify1(x) #endif /* lttng_ust_stringify */ #define LTTNG_UST_ABI_SYM_NAME_LEN 256 @@ -139,8 +139,8 @@ enum lttng_ust_abi_counter_bitness { }; struct lttng_ust_abi_key_token { - uint32_t len; /* length of child structure. */ - uint32_t type; /* enum lttng_ust_abi_key_token_type */ + uint32_t len; /* length of child structure. */ + uint32_t type; /* enum lttng_ust_abi_key_token_type */ /* * The size of this structure is fixed because it is embedded into * children structures. @@ -150,9 +150,9 @@ struct lttng_ust_abi_key_token { /* Length of this structure excludes the following string. */ struct lttng_ust_abi_key_token_string { struct lttng_ust_abi_key_token parent; - uint32_t string_len; /* string length (includes \0) */ + uint32_t string_len; /* string length (includes \0) */ - char str[]; /* Null-terminated string following this structure. */ + char str[]; /* Null-terminated string following this structure. */ } LTTNG_PACKED; /* @@ -165,13 +165,13 @@ struct lttng_ust_abi_key_token_string { * a given map dimension. */ enum lttng_ust_abi_key_type { - LTTNG_UST_ABI_KEY_TYPE_TOKENS = 0, /* Dimension key is a set of tokens. */ - LTTNG_UST_ABI_KEY_TYPE_INTEGER = 1, /* Dimension key is an integer value. */ + LTTNG_UST_ABI_KEY_TYPE_TOKENS = 0, /* Dimension key is a set of tokens. */ + LTTNG_UST_ABI_KEY_TYPE_INTEGER = 1, /* Dimension key is an integer value. */ }; struct lttng_ust_abi_counter_key_dimension { - uint32_t len; /* length of child structure */ - uint32_t key_type; /* enum lttng_ust_abi_key_type */ + uint32_t len; /* length of child structure */ + uint32_t key_type; /* enum lttng_ust_abi_key_type */ /* * The size of this structure is fixed because it is embedded into * children structures. @@ -202,11 +202,11 @@ enum lttng_ust_abi_counter_action { }; struct lttng_ust_abi_counter_event { - uint32_t len; /* length of this structure */ - uint32_t action; /* enum lttng_ust_abi_counter_action */ + uint32_t len; /* length of this structure */ + uint32_t action; /* enum lttng_ust_abi_counter_action */ struct lttng_ust_abi_event event; - uint32_t number_key_dimensions; /* array of dimensions is an array of var. len. elements. */ + uint32_t number_key_dimensions; /* array of dimensions is an array of var. len. elements. */ /* * Followed by additional data specific to the action, and by a @@ -220,9 +220,9 @@ enum lttng_ust_abi_counter_dimension_flags { }; struct lttng_ust_abi_counter_dimension { - uint32_t key_type; /* enum lttng_ust_abi_key_type */ - uint32_t flags; /* enum lttng_ust_abi_counter_dimension_flags */ - uint64_t size; /* dimension size (count of entries) */ + uint32_t key_type; /* enum lttng_ust_abi_key_type */ + uint32_t flags; /* enum lttng_ust_abi_counter_dimension_flags */ + uint64_t size; /* dimension size (count of entries) */ uint64_t underflow_index; uint64_t overflow_index; } LTTNG_PACKED; diff --git a/src/bin/lttng-sessiond/ust-app.hpp b/src/bin/lttng-sessiond/ust-app.hpp index b007583d0..50abb643c 100644 --- a/src/bin/lttng-sessiond/ust-app.hpp +++ b/src/bin/lttng-sessiond/ust-app.hpp @@ -19,8 +19,8 @@ #include #include -#include #include +#include #define UST_APP_EVENT_LIST_SIZE 32 diff --git a/src/bin/lttng-sessiond/ust-ctl-internal.hpp b/src/bin/lttng-sessiond/ust-ctl-internal.hpp index d2463c93f..8485cd5ef 100644 --- a/src/bin/lttng-sessiond/ust-ctl-internal.hpp +++ b/src/bin/lttng-sessiond/ust-ctl-internal.hpp @@ -541,36 +541,36 @@ int lttng_ust_ctl_reply_register_event(int sock, * Returns 0 on success, negative UST or system error value on error. */ int lttng_ust_ctl_recv_register_key(int sock, - int *session_objd, /* session descriptor (output) */ - int *map_objd, /* map descriptor (output) */ - uint32_t *dimension, /* - * Against which dimension is - * this key expressed. (output) - */ - uint64_t **dimension_indexes, /* - * Indexes (output, - * dynamically - * allocated, must be - * free(3)'d by the - * caller if function - * returns success.) - * Contains @dimension - * elements. - */ - char **key_string, /* - * key string (output, - * dynamically allocated, must - * be free(3)'d by the caller if - * function returns success.) - */ - uint64_t *user_token); + int *session_objd, /* session descriptor (output) */ + int *map_objd, /* map descriptor (output) */ + uint32_t *dimension, /* + * Against which dimension is + * this key expressed. (output) + */ + uint64_t **dimension_indexes, /* + * Indexes (output, + * dynamically + * allocated, must be + * free(3)'d by the + * caller if function + * returns success.) + * Contains @dimension + * elements. + */ + char **key_string, /* + * key string (output, + * dynamically allocated, must + * be free(3)'d by the caller if + * function returns success.) + */ + uint64_t *user_token); /* * Returns 0 on success, negative error value on error. */ int lttng_ust_ctl_reply_register_key(int sock, - uint64_t index, /* Index within dimension (input) */ - int ret_code); /* return code. 0 ok, negative error */ + uint64_t index, /* Index within dimension (input) */ + int ret_code); /* return code. 0 ok, negative error */ /* * Returns 0 on success, negative UST or system error value on error. diff --git a/src/bin/lttng-sessiond/ust-registry-channel.cpp b/src/bin/lttng-sessiond/ust-registry-channel.cpp index a77e335c8..a153eac6e 100644 --- a/src/bin/lttng-sessiond/ust-registry-channel.cpp +++ b/src/bin/lttng-sessiond/ust-registry-channel.cpp @@ -498,8 +498,8 @@ void lsu::registry_channel::_accept_on_event_classes( lttng::sessiond::trace::trace_class_visitor& visitor) const { const lttng::urcu::lfht_iteration_adapter + decltype(lsu::registry_event::_node), + &lsu::registry_event::_node> events_view(*_events->ht); /* Copy the event ptrs from the _events ht to this vector which we'll sort. */ diff --git a/src/bin/lttng-sessiond/ust-registry-session.cpp b/src/bin/lttng-sessiond/ust-registry-session.cpp index f5da265b1..a9671dfe2 100644 --- a/src/bin/lttng-sessiond/ust-registry-session.cpp +++ b/src/bin/lttng-sessiond/ust-registry-session.cpp @@ -553,8 +553,8 @@ void lsu::registry_session::_accept_on_stream_classes(lst::trace_class_visitor& ASSERT_LOCKED(_lock); const lttng::urcu::lfht_iteration_adapter + decltype(lsu::registry_channel::_node), + &lsu::registry_channel::_node> channels_ht_view(*_channels->ht); std::vector sorted_stream_classes( channels_ht_view.begin(), channels_ht_view.end()); diff --git a/src/common/conditions/session-rotation.cpp b/src/common/conditions/session-rotation.cpp index 45e360996..9bc085831 100644 --- a/src/common/conditions/session-rotation.cpp +++ b/src/common/conditions/session-rotation.cpp @@ -318,8 +318,7 @@ static ssize_t create_evaluation_from_payload(enum lttng_condition_type type, struct lttng_evaluation *evaluation = nullptr; struct lttng_trace_archive_location *location = nullptr; const struct lttng_evaluation_session_rotation_comm *comm; - const lttng_payload_view comm_view = - lttng_payload_view_from_view(view, 0, sizeof(*comm)); + const lttng_payload_view comm_view = lttng_payload_view_from_view(view, 0, sizeof(*comm)); if (!lttng_payload_view_is_valid(&comm_view)) { goto error;