From 62d6b5d04a4c154809781fb39a659f95aa815dfd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 24 Oct 2024 17:01:44 -0400 Subject: [PATCH] Clean-up: unify comment style MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some comment blocks use /** in lieu of /* on the first line. Since the latter style is prevalent in the code base, replace all instances to attain One True Style. Signed-off-by: Jérémie Galarneau Change-Id: Ica1aee472bdbeaaa40ee32f67274e3c43f7f9850 --- src/bin/lttng-sessiond/modprobe.cpp | 14 ++++++------- .../notification-thread-events.hpp | 2 +- .../lttng-sessiond/notification-thread.hpp | 2 +- src/bin/lttng-sessiond/session.hpp | 2 +- src/common/align.hpp | 4 ++-- src/common/buffer-view.hpp | 10 +++++----- src/common/bug.hpp | 2 +- src/common/exception.hpp | 20 +++++++++---------- src/common/payload-view.hpp | 16 +++++++-------- src/common/payload.hpp | 2 +- src/common/utils.cpp | 8 ++++---- .../bt2_plugins/field_stats/field_stats.cpp | 2 +- .../bt2_plugins/field_stats/field_stats.hpp | 2 +- tests/utils/tap/clock.cpp | 2 +- .../gen-syscall-events-callstack.c | 2 +- tests/utils/xml-utils/extract_xml.cpp | 2 +- 16 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/bin/lttng-sessiond/modprobe.cpp b/src/bin/lttng-sessiond/modprobe.cpp index d14dd7dfc..fd72f7ee9 100644 --- a/src/bin/lttng-sessiond/modprobe.cpp +++ b/src/bin/lttng-sessiond/modprobe.cpp @@ -6,7 +6,7 @@ * */ -/** +/* * @file modprobe.c * * @brief modprobe related functions. @@ -316,7 +316,7 @@ static int probes_capacity; #ifdef HAVE_KMOD #include -/** +/* * @brief Logging function for libkmod integration. */ static ATTR_FORMAT_PRINTF(6, 0) void log_kmod(void *data __attribute__((unused)), @@ -337,7 +337,7 @@ static ATTR_FORMAT_PRINTF(6, 0) void log_kmod(void *data __attribute__((unused)) free(str); } -/** +/* * @brief Setup the libkmod context. * * Create the context, add a custom logging function and preload the @@ -376,7 +376,7 @@ error: return ret; } -/** +/* * @brief Loads the kernel modules in \p modules * * @param modules List of modules to load @@ -435,7 +435,7 @@ error: return ret; } -/** +/* * @brief Recursively unload modules. * * This function implements the same modules unloading behavior as @@ -476,7 +476,7 @@ static int rmmod_recurse(struct kmod_module *mod) return ret; } -/** +/* * @brief Unloads the kernel modules in \p modules * * @param modules List of modules to unload @@ -672,7 +672,7 @@ int modprobe_lttng_control() return modprobe_lttng(kern_modules_control_core, ARRAY_SIZE(kern_modules_control_core)); } -/** +/* * Grow global list of probes (double capacity or set it to 1 if * currently 0 and copy existing data). */ diff --git a/src/bin/lttng-sessiond/notification-thread-events.hpp b/src/bin/lttng-sessiond/notification-thread-events.hpp index 955b16cdd..68082cbb5 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.hpp +++ b/src/bin/lttng-sessiond/notification-thread-events.hpp @@ -12,7 +12,7 @@ #include -/** +/* * Event handling function shall only return an error if * the thread should be stopped. */ diff --git a/src/bin/lttng-sessiond/notification-thread.hpp b/src/bin/lttng-sessiond/notification-thread.hpp index c995fc951..884149c56 100644 --- a/src/bin/lttng-sessiond/notification-thread.hpp +++ b/src/bin/lttng-sessiond/notification-thread.hpp @@ -83,7 +83,7 @@ struct notification_thread_handle { sem_t ready; }; -/** +/* * This thread maintains an internal state associating clients and triggers. * * In order to speed-up and simplify queries, hash tables providing the diff --git a/src/bin/lttng-sessiond/session.hpp b/src/bin/lttng-sessiond/session.hpp index b091c2ef3..c082afc30 100644 --- a/src/bin/lttng-sessiond/session.hpp +++ b/src/bin/lttng-sessiond/session.hpp @@ -476,7 +476,7 @@ namespace sessiond { std::unique_lock lock_session_list(); namespace exceptions { -/** +/* * @class session_not_found_error * @brief Represents a session-not-found error and provides the parameters used to query the session * for use by error-reporting code. diff --git a/src/common/align.hpp b/src/common/align.hpp index fab15af8c..fc58a776b 100644 --- a/src/common/align.hpp +++ b/src/common/align.hpp @@ -26,7 +26,7 @@ #define lttng_align_floor(v, align) __lttng_align_floor_mask(v, (__typeof__(v)) (align) -1) -/** +/* * lttng_offset_align - Calculate the offset needed to align an object on its natural * alignment towards higher addresses. * @align_drift: object offset from an "alignment"-aligned address. @@ -41,7 +41,7 @@ (((alignment) - (align_drift)) & ((alignment) -1)); \ }) -/** +/* * lttng_offset_align_floor - Calculate the offset needed to align an object * on its natural alignment towards lower addresses. * @align_drift: object offset from an "alignment"-aligned address. diff --git a/src/common/buffer-view.hpp b/src/common/buffer-view.hpp index 131275af2..ba9211c9d 100644 --- a/src/common/buffer-view.hpp +++ b/src/common/buffer-view.hpp @@ -21,7 +21,7 @@ struct lttng_buffer_view { size_t size; }; -/** +/* * Return a buffer view referencing a subset of the memory referenced by a raw * pointer. * @@ -34,7 +34,7 @@ struct lttng_buffer_view { */ struct lttng_buffer_view lttng_buffer_view_init(const char *src, size_t offset, ptrdiff_t len); -/** +/* * Checks if a buffer view is safe to access. * * After calling the buffer view creation functions, callers should verify @@ -45,7 +45,7 @@ struct lttng_buffer_view lttng_buffer_view_init(const char *src, size_t offset, */ bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view); -/** +/* * Return a buffer view referencing a subset of the memory referenced by another * view. * @@ -61,7 +61,7 @@ bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view); struct lttng_buffer_view lttng_buffer_view_from_view(const struct lttng_buffer_view *src, size_t offset, ptrdiff_t len); -/** +/* * Return a buffer view referencing a subset of the memory referenced by a * dynamic buffer. * @@ -77,7 +77,7 @@ lttng_buffer_view_from_view(const struct lttng_buffer_view *src, size_t offset, struct lttng_buffer_view lttng_buffer_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *src, size_t offset, ptrdiff_t len); -/** +/* * Verify that `buf` contains a string starting at `str` of length * `len_with_null_terminator`. * diff --git a/src/common/bug.hpp b/src/common/bug.hpp index 758fcf70c..e4ae76865 100644 --- a/src/common/bug.hpp +++ b/src/common/bug.hpp @@ -22,7 +22,7 @@ #define LTTNG_BUILD_BUG_ON(condition) ((void) sizeof(char[-!!(condition)])) -/** +/* * LTTNG_BUILD_RUNTIME_BUG_ON - check condition at build (if constant) or runtime * @condition: the condition which should be false. * diff --git a/src/common/exception.hpp b/src/common/exception.hpp index 35f80ba17..da6997d42 100644 --- a/src/common/exception.hpp +++ b/src/common/exception.hpp @@ -35,7 +35,7 @@ throw lttng::invalid_argument_error(msg, LTTNG_SOURCE_LOCATION()) namespace lttng { -/** +/* * @class source_location * @brief Represents the location in the source code where an exception was thrown. * @@ -73,7 +73,7 @@ public: unsigned int line_number; }; -/** +/* * @class runtime_error * @brief Base type for all LTTng exceptions. * @@ -95,7 +95,7 @@ public: lttng::source_location source_location; }; -/** +/* * @class allocation_failure * @brief Represents an allocation failure. * @@ -111,7 +111,7 @@ public: std::size_t allocation_size; }; -/** +/* * @class out_of_range * @brief Represents an out of range access error. * @@ -124,7 +124,7 @@ public: const lttng::source_location& source_location); }; -/** +/* * @class unsupported_error * @brief Represents an error for unsupported features. * @@ -138,7 +138,7 @@ public: }; namespace ctl { -/** +/* * @class error * @brief Wraps lttng_error_code errors for reporting through liblttng-ctl's interface. * @@ -162,7 +162,7 @@ private: }; } /* namespace ctl */ -/** +/* * @class posix_error * @brief Wraps a POSIX system error, including the location where the error occurred. */ @@ -173,7 +173,7 @@ public: const lttng::source_location& source_location); }; -/** +/* * @class communication_error * @brief Base class for communication errors between components. */ @@ -183,7 +183,7 @@ public: const lttng::source_location& source_location); }; -/** +/* * @class protocol_error * @brief Base class for protocol layer communication errors (encoding or decoding problems). */ @@ -193,7 +193,7 @@ public: const lttng::source_location& source_location); }; -/** +/* * @class invalid_argument_error * @brief Represents an error for invalid arguments. */ diff --git a/src/common/payload-view.hpp b/src/common/payload-view.hpp index 1980c0a2f..b05233523 100644 --- a/src/common/payload-view.hpp +++ b/src/common/payload-view.hpp @@ -55,7 +55,7 @@ struct lttng_payload_view { } _iterator; }; -/** +/* * Checks if a payload view's buffer is safe to access. * * After calling the payload view creation functions, callers should verify @@ -66,7 +66,7 @@ struct lttng_payload_view { */ bool lttng_payload_view_is_valid(const struct lttng_payload_view *view); -/** +/* * Return a payload view referencing a subset of a payload. * * @payload Source payload to reference @@ -78,7 +78,7 @@ bool lttng_payload_view_is_valid(const struct lttng_payload_view *view); struct lttng_payload_view lttng_payload_view_from_payload(const struct lttng_payload *payload, size_t offset, ptrdiff_t len); -/** +/* * Return a payload view referencing a subset of a payload referenced by * another payload view. * @@ -91,7 +91,7 @@ lttng_payload_view_from_payload(const struct lttng_payload *payload, size_t offs struct lttng_payload_view lttng_payload_view_from_view(struct lttng_payload_view *view, size_t offset, ptrdiff_t len); -/** +/* * Return a payload view referencing a subset of a dynamic buffer. * * Meant as an adapter for code paths that need to create a payload view @@ -105,7 +105,7 @@ lttng_payload_view_from_view(struct lttng_payload_view *view, size_t offset, ptr */ struct lttng_payload_view lttng_payload_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *buffer, size_t offset, ptrdiff_t len); -/** +/* * * Return a payload view referencing a subset of a dynamic buffer. * @@ -122,7 +122,7 @@ struct lttng_payload_view lttng_payload_view_from_buffer_view(const struct lttng size_t offset, ptrdiff_t len); -/** +/* * Return a payload view referencing a subset of the memory referenced by a raw * pointer. * @@ -136,7 +136,7 @@ struct lttng_payload_view lttng_payload_view_from_buffer_view(const struct lttng struct lttng_payload_view lttng_payload_view_init_from_buffer(const char *src, size_t offset, ptrdiff_t len); -/** +/* * Get the number of file descriptor handles left in a payload view. * * @payload Payload instance @@ -145,7 +145,7 @@ lttng_payload_view_init_from_buffer(const char *src, size_t offset, ptrdiff_t le */ int lttng_payload_view_get_fd_handle_count(const struct lttng_payload_view *payload_view); -/** +/* * Pop an fd handle from a payload view. * * A reference to the returned fd_handle is acquired on behalf of the caller. diff --git a/src/common/payload.hpp b/src/common/payload.hpp index 0e27efa2c..a6f1dd593 100644 --- a/src/common/payload.hpp +++ b/src/common/payload.hpp @@ -44,7 +44,7 @@ void lttng_payload_reset(struct lttng_payload *payload); */ void lttng_payload_clear(struct lttng_payload *payload); -/** +/* * Add an fd to the payload. * The payload acquires a reference to the fd_handle. * diff --git a/src/common/utils.cpp b/src/common/utils.cpp index f1be2c39e..c6b9a55b1 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -354,7 +354,7 @@ int utils_stream_file_path(const char *path_name, return ret; } -/** +/* * Parse a string that represents a size in human readable format. It * supports decimal integers suffixed by 'k', 'K', 'M' or 'G'. * @@ -451,7 +451,7 @@ end: return ret; } -/** +/* * Parse a string that represents a time in human readable format. It * supports decimal integers suffixed by: * "us" for microsecond, @@ -709,7 +709,7 @@ int utils_get_count_order_u64(uint64_t x) return fls_u64(x - 1); } -/** +/* * Obtain the value of LTTNG_HOME environment variable, if exists. * Otherwise returns the value of HOME. */ @@ -740,7 +740,7 @@ end: return val; } -/** +/* * Get user's home directory. Dynamically allocated, must be freed * by the caller. */ diff --git a/tests/utils/bt2_plugins/field_stats/field_stats.cpp b/tests/utils/bt2_plugins/field_stats/field_stats.cpp index e3be5558f..c4e9b6904 100644 --- a/tests/utils/bt2_plugins/field_stats/field_stats.cpp +++ b/tests/utils/bt2_plugins/field_stats/field_stats.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2023 Kienan Stewart * * SPDX-License-Identifier: LGPL-2.1-only diff --git a/tests/utils/bt2_plugins/field_stats/field_stats.hpp b/tests/utils/bt2_plugins/field_stats/field_stats.hpp index b1977af04..a1fb19517 100644 --- a/tests/utils/bt2_plugins/field_stats/field_stats.hpp +++ b/tests/utils/bt2_plugins/field_stats/field_stats.hpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2023 Kienan Stewart * * SPDX-License-Identifier: LGPL-2.1-only diff --git a/tests/utils/tap/clock.cpp b/tests/utils/tap/clock.cpp index 9af321ff9..bc4f2f2fe 100644 --- a/tests/utils/tap/clock.cpp +++ b/tests/utils/tap/clock.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2023 Kienan Stewart * * SPDX-License-Identifier: LGPL-2.1-only diff --git a/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c b/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c index bee03a42c..deb035a3b 100644 --- a/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c +++ b/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c @@ -17,7 +17,7 @@ #include #include -/** +/* * The process waits for the creation of a file passed as argument from an * external processes to execute a syscall and exiting. This is useful for tests * in combinaison with LTTng's PID tracker feature where we can trace the kernel diff --git a/tests/utils/xml-utils/extract_xml.cpp b/tests/utils/xml-utils/extract_xml.cpp index 2531d0832..850ed8ccb 100644 --- a/tests/utils/xml-utils/extract_xml.cpp +++ b/tests/utils/xml-utils/extract_xml.cpp @@ -46,7 +46,7 @@ static int opt_verbose; static int node_exist; static bool result = false; -/** +/* * print_xpath_nodes: * nodes: the nodes set. * output: the output file handle. -- 2.34.1