Sort includes in C++ files
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 29 Nov 2023 15:48:40 +0000 (10:48 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 1 Dec 2023 00:07:34 +0000 (19:07 -0500)
Set the `SortIncludes` option of clang-format to `Regroup`, meaning that
it will group include statements based on the categories in
`IncludeCategories`.

In `IncludeCategories`, define categories such that the groups are (in
order of priority):

  1. C++ system headers
  2. C system headers
  3. Babeltrace 2 public headers
  4. Logging headers (logging/log.h, as well as other header files
     including it): it might be important for these files to stay at the
     top, in case there is some logging in header files, so that things
     like log tags are properly set.
  5  Internal common headers (e.g. from common, cpp-common, compat,
     logging)
  6. Plugin common files (from plugins/common)
  7. Local headers
  8. tap/tap.h: it defines macros with common names, such as `ok` and
     `fail`, which may clash with identifiers in other headers.  It's
     safer to keep it last.

Includes in files parser.ypp and lexer.lpp were sorted by hand.  Due to
the change in inclusion order, parser.hpp (generated from parser.ypp)
did not see the definition of yyscan_t anymore.  Add an inclusion of
scanner.hpp in the `%code requires` section, which ends up in both the
generated .cpp and .hpp files.

Change-Id: I0568167065b90070ac03ea4daf4d0a1927bec4b5
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11459
Tested-by: jenkins <jenkins@lttng.org>
91 files changed:
.clang-format
src/cpp-common/bt2/clock-class.hpp
src/cpp-common/bt2/clock-snapshot.hpp
src/cpp-common/bt2/exc.hpp
src/cpp-common/bt2/field-class.hpp
src/cpp-common/bt2/field-path.hpp
src/cpp-common/bt2/field.hpp
src/cpp-common/bt2/integer-range-set.hpp
src/cpp-common/bt2/integer-range.hpp
src/cpp-common/bt2/message.hpp
src/cpp-common/bt2/trace-ir.hpp
src/cpp-common/bt2/value.hpp
src/cpp-common/cfg-error-reporting-throw.hpp
src/cpp-common/cfg-error-reporting.hpp
src/cpp-common/cfg-logging-error-reporting-throw.hpp
src/cpp-common/cfg-logging-error-reporting.hpp
src/cpp-common/cfg-logging.hpp
src/cpp-common/exc.hpp
src/cpp-common/glib-up.hpp
src/cpp-common/log-cfg.hpp
src/cpp-common/make-unique.hpp
src/cpp-common/uuid-view.cpp
src/cpp-common/uuid-view.hpp
src/cpp-common/uuid.hpp
src/cpp-common/vector.hpp
src/plugins/ctf/common/bfcr/bfcr.cpp
src/plugins/ctf/common/bfcr/bfcr.hpp
src/plugins/ctf/common/metadata/ast.hpp
src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp
src/plugins/ctf/common/metadata/ctf-meta-translate.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-alignments.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-meanings.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.cpp
src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.cpp
src/plugins/ctf/common/metadata/ctf-meta-validate.cpp
src/plugins/ctf/common/metadata/ctf-meta-visitors.hpp
src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.cpp
src/plugins/ctf/common/metadata/ctf-meta.hpp
src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.cpp
src/plugins/ctf/common/metadata/decoder.cpp
src/plugins/ctf/common/metadata/decoder.hpp
src/plugins/ctf/common/metadata/lexer.lpp
src/plugins/ctf/common/metadata/logging.hpp
src/plugins/ctf/common/metadata/objstack.cpp
src/plugins/ctf/common/metadata/parser.ypp
src/plugins/ctf/common/metadata/scanner.hpp
src/plugins/ctf/common/metadata/visitor-generate-ir.cpp
src/plugins/ctf/common/metadata/visitor-parent-links.cpp
src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp
src/plugins/ctf/common/msg-iter/msg-iter.cpp
src/plugins/ctf/common/msg-iter/msg-iter.hpp
src/plugins/ctf/common/print.hpp
src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp
src/plugins/ctf/fs-sink/fs-sink-stream.cpp
src/plugins/ctf/fs-sink/fs-sink-stream.hpp
src/plugins/ctf/fs-sink/fs-sink-trace.cpp
src/plugins/ctf/fs-sink/fs-sink-trace.hpp
src/plugins/ctf/fs-sink/fs-sink.cpp
src/plugins/ctf/fs-sink/fs-sink.hpp
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/data-stream-file.hpp
src/plugins/ctf/fs-src/file.cpp
src/plugins/ctf/fs-src/file.hpp
src/plugins/ctf/fs-src/fs.cpp
src/plugins/ctf/fs-src/fs.hpp
src/plugins/ctf/fs-src/lttng-index.hpp
src/plugins/ctf/fs-src/metadata.cpp
src/plugins/ctf/fs-src/metadata.hpp
src/plugins/ctf/fs-src/query.cpp
src/plugins/ctf/fs-src/query.hpp
src/plugins/ctf/lttng-live/data-stream.cpp
src/plugins/ctf/lttng-live/data-stream.hpp
src/plugins/ctf/lttng-live/lttng-live.cpp
src/plugins/ctf/lttng-live/lttng-live.hpp
src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp
src/plugins/ctf/lttng-live/metadata.cpp
src/plugins/ctf/lttng-live/viewer-connection.cpp
src/plugins/ctf/lttng-live/viewer-connection.hpp
src/plugins/ctf/plugin.cpp
tests/lib/conds/conds-triggers.cpp
tests/lib/conds/utils.cpp
tests/lib/test-fields-bin.cpp
tests/lib/utils/run-in.cpp
tests/lib/utils/run-in.hpp

index 300e046c5f7a8ead68809eb8b4bb45cb89a69525..cba562531157c82aefa5a16f861ef044fa5388e0 100644 (file)
@@ -79,7 +79,33 @@ ForEachMacros: [
   'bt_list_for_each_prev',
   'bt_list_for_each_prev_safe',
 ]
-IncludeBlocks: Preserve
+IncludeBlocks: Regroup
+IncludeCategories:
+  # Babeltrace 2 public headers
+  - Regex: '^<babeltrace2/.+>$'
+    Priority: 3
+  # System C headers
+  - Regex: '^<.+\.h>$'
+    Priority: 2
+  # System C++ headers
+  - Regex: '^<.+>$'
+    Priority: 1
+  # Logging headers
+  - Regex: '^"(logging\.hpp|logging/comp-logging\.h|logging/log\.h)"$'
+    Priority: 4
+  # Common headers
+  - Regex: '^"(argpar|autodisc|common|compat|cpp-common|ctfser|fd-cache|param-parse|py-common|logging|string-format)/.+"$'
+    Priority: 5
+  # Plugins common headers
+  - Regex: '^"plugins/common/.+"$'
+    Priority: 6
+  # tap header file
+  - Regex: '^"(tap/)?tap\.h"$'
+    Priority: 8
+  # The rest (local headers)
+  - Regex: '.+'
+    Priority: 7
+IncludeIsMainRegex: "please_dont_do_that"
 IndentAccessModifiers: false
 IndentCaseBlocks: false
 IndentCaseLabels: false
@@ -98,7 +124,7 @@ PPIndentWidth: 4
 PointerAlignment: Right
 ReferenceAlignment: Left
 ReflowComments: false
-SortIncludes: false
+SortIncludes: CaseInsensitive
 SortUsingDeclarations: false
 SpaceAfterCStyleCast: true
 SpaceAfterLogicalNot: false
index e3463d9634b6a12324d99505b8b9ebade7900d13..b236764510e437808965aab6b8f9b4cee1f989cb 100644 (file)
@@ -7,18 +7,20 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_CLOCK_CLASS_HPP
 #define BABELTRACE_CPP_COMMON_BT2_CLOCK_CLASS_HPP
 
-#include <type_traits>
 #include <cstdint>
 #include <string>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
-#include "internal/borrowed-obj.hpp"
-#include "internal/shared-obj.hpp"
-#include "internal/utils.hpp"
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
 #include "cpp-common/uuid-view.hpp"
+
 #include "exc.hpp"
+#include "internal/borrowed-obj.hpp"
+#include "internal/shared-obj.hpp"
+#include "internal/utils.hpp"
 #include "value.hpp"
 
 namespace bt2 {
index 643a229e1cdb3730bd4e04778c05e2b4b80f6876..364400b6ff809e54b300c4f2f0f7748b5f63f91b 100644 (file)
@@ -8,10 +8,11 @@
 #define BABELTRACE_CPP_COMMON_BT2_CLOCK_SNAPSHOT_HPP
 
 #include <cstdint>
+
 #include <babeltrace2/babeltrace.h>
 
-#include "internal/borrowed-obj.hpp"
 #include "exc.hpp"
+#include "internal/borrowed-obj.hpp"
 
 namespace bt2 {
 
index 4b57e43be51ed9ab329e3df021954c89c4580175..96a6b2cf2a2549cf6a2ea0b8ea8658692d07077a 100644 (file)
@@ -7,8 +7,8 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_EXC_HPP
 #define BABELTRACE_CPP_COMMON_BT2_EXC_HPP
 
-#include <string>
 #include <stdexcept>
+#include <string>
 
 #include "cpp-common/exc.hpp"
 
index 6e1c0d679b5a0ff78126724aa19a9a25a44aff6e..165cfde32d35dad38eb7806ea58ae40ba59d1425 100644 (file)
@@ -7,20 +7,22 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_FIELD_CLASS_HPP
 #define BABELTRACE_CPP_COMMON_BT2_FIELD_CLASS_HPP
 
-#include <type_traits>
 #include <cstdint>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "internal/borrowed-obj.hpp"
-#include "internal/shared-obj.hpp"
-#include "internal/utils.hpp"
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
+
 #include "common-iter.hpp"
 #include "exc.hpp"
-#include "integer-range-set.hpp"
 #include "field-path.hpp"
+#include "integer-range-set.hpp"
+#include "internal/borrowed-obj.hpp"
+#include "internal/shared-obj.hpp"
+#include "internal/utils.hpp"
 #include "value.hpp"
 
 namespace bt2 {
index 0a0244802d87c6571c0d6cb60a248bb0c5571bfe..0a68927cf9dfc2e56fa82b1557b0907777a3cacf 100644 (file)
@@ -8,9 +8,11 @@
 #define BABELTRACE_CPP_COMMON_BT2_FIELD_PATH_HPP
 
 #include <cstdint>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
+
 #include "common-iter.hpp"
 #include "internal/borrowed-obj.hpp"
 #include "internal/shared-obj.hpp"
index dd17945fa6c1e6a9f74f3265d03cb81e84f7d4d0..5a3fdfd93ea106b82436dde1d97b8ef6f11bdeb1 100644 (file)
@@ -7,16 +7,18 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_FIELD_HPP
 #define BABELTRACE_CPP_COMMON_BT2_FIELD_HPP
 
-#include <type_traits>
 #include <cstdint>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "internal/borrowed-obj.hpp"
-#include "internal/utils.hpp"
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
+
 #include "field-class.hpp"
+#include "internal/borrowed-obj.hpp"
+#include "internal/utils.hpp"
 
 namespace bt2 {
 
index ad2baa1e7923a79eef33938986ff50d630ccf71e..a86bcaf9dc872b307bd79803619587bcbfe038ec 100644 (file)
@@ -9,13 +9,14 @@
 
 #include <cstdint>
 #include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common-iter.hpp"
+#include "exc.hpp"
+#include "integer-range.hpp"
 #include "internal/borrowed-obj.hpp"
 #include "internal/utils.hpp"
-#include "integer-range.hpp"
-#include "exc.hpp"
 
 namespace bt2 {
 
index 7e2389927082ab7ce741725b1c4c47bf4e632b8a..125707187fc5c390ec05c899da2c322eaaf6ac1a 100644 (file)
@@ -7,8 +7,9 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP
 #define BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP
 
-#include <type_traits>
 #include <cstdint>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "internal/borrowed-obj.hpp"
index 8d54a8da552b469aacaf9d1f66d305c1594ad438..1603a6dd7a8bb37aaac4fdf9de30513beff422ce 100644 (file)
@@ -7,20 +7,22 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP
 #define BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP
 
-#include <type_traits>
 #include <cstdint>
 #include <functional>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
 #include "common/common.h"
-#include "internal/borrowed-obj.hpp"
-#include "internal/shared-obj.hpp"
-#include "internal/utils.hpp"
 #include "cpp-common/bt2/trace-ir.hpp"
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
+
 #include "exc.hpp"
+#include "internal/borrowed-obj.hpp"
+#include "internal/shared-obj.hpp"
+#include "internal/utils.hpp"
 
 namespace bt2 {
 namespace internal {
index 39ec0b672d343cf21659188a100d719291ae9dda..b61394e71d8ff8d641c3aafc9083c5a5ffe68bbe 100644 (file)
@@ -7,19 +7,21 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP
 #define BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP
 
-#include <type_traits>
 #include <cstdint>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
-#include "internal/borrowed-obj.hpp"
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
+
 #include "clock-class.hpp"
 #include "clock-snapshot.hpp"
 #include "field-class.hpp"
 #include "field.hpp"
-#include "value.hpp"
+#include "internal/borrowed-obj.hpp"
 #include "internal/utils.hpp"
+#include "value.hpp"
 
 namespace bt2 {
 
index 6e05cd0d36c80625f8a35a30c7f187bb850f697b..f99dbe94975b2ce57a855c814317bce1f90a329c 100644 (file)
@@ -7,21 +7,23 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_VALUE_HPP
 #define BABELTRACE_CPP_COMMON_BT2_VALUE_HPP
 
-#include <type_traits>
 #include <cstdint>
 #include <functional>
 #include <iterator>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
 #include "common/common.h"
+#include "cpp-common/optional.hpp"
+#include "cpp-common/string_view.hpp"
+
 #include "common-iter.hpp"
+#include "exc.hpp"
 #include "internal/borrowed-obj.hpp"
 #include "internal/shared-obj.hpp"
 #include "internal/utils.hpp"
-#include "cpp-common/optional.hpp"
-#include "cpp-common/string_view.hpp"
-#include "exc.hpp"
 
 namespace bt2 {
 namespace internal {
index 2d1400ed4460e5f8d9fea91949747611673a6e3c..55059c5a2b9ffdb341d8ee675498c5f5072f744f 100644 (file)
@@ -10,6 +10,7 @@
 #define BABELTRACE_CPP_COMMON_CFG_ERROR_REPORTING_THROW_HPP
 
 #include <babeltrace2/babeltrace.h>
+
 #include "cfg-error-reporting.hpp"
 
 /*
index 5951a865204d3e4f257225087d745a3dbf019725..81f946825af707f6616ec74a8c5aa420baded97b 100644 (file)
@@ -9,6 +9,7 @@
 #define BABELTRACE_CPP_COMMON_CFG_ERROR_REPORTING_HPP
 
 #include <babeltrace2/babeltrace.h>
+
 #include "cfg-logging.hpp"
 
 /*
index 55a3f98185bf9bc4a701eaf842010e8bba6ef552..16de0ce78813a0b8a59588a40e0b9d57d18a5a47 100644 (file)
@@ -10,6 +10,7 @@
 #define BABELTRACE_CPP_COMMON_CFG_LOGGING_ERROR_REPORTING_THROW_HPP
 
 #include <babeltrace2/babeltrace.h>
+
 #include "cfg-logging-error-reporting.hpp"
 
 /*
index 0bd0ec0ddab5a201d287a04af261be0725d01b1a..1cdc0793b24cf8303c7e727e303ce8aacc1e95dc 100644 (file)
@@ -9,8 +9,9 @@
 #define BABELTRACE_CPP_COMMON_CFG_LOGGING_ERROR_REPORTING_HPP
 
 #include <babeltrace2/babeltrace.h>
-#include "cfg-logging.hpp"
+
 #include "cfg-error-reporting.hpp"
+#include "cfg-logging.hpp"
 
 /*
  * Logs with the error level using the configuration `_log_cfg` and
index aeee7622f2a1b447836afd29ff95d74673b3aca9..cdd1308befe75ffa0233d928434da8e9575ab08b 100644 (file)
@@ -15,6 +15,7 @@
 #endif
 
 #include <babeltrace2/babeltrace.h>
+
 #include "logging/log.h"
 
 #define _BT_CLOG_OBJ_FMT_PREFIX "[%s] "
index 1c2e1d663292d3beedc808f9d4408a91c9f4fcfe..09da6beccb8857cba51d8924b0994e6386a52a28 100644 (file)
@@ -8,9 +8,9 @@
 #define BABELTRACE_CPP_COMMON_EXC_HPP
 
 #include <exception>
-#include <string>
 #include <new>
 #include <stdexcept>
+#include <string>
 
 namespace bt2_common {
 
index e030f883c38d3ff0d7c141c94a89677eba7c827c..33e04a9dc108bca651cb631b67ec8901352ab335 100644 (file)
@@ -7,9 +7,10 @@
 #ifndef BABELTRACE_CPP_COMMON_GLIB_UP_HPP
 #define BABELTRACE_CPP_COMMON_GLIB_UP_HPP
 
-#include <glib.h>
 #include <memory>
 
+#include <glib.h>
+
 namespace bt2_common {
 namespace internal {
 
index 2ddfab07cc8952bc744683132600b8638ec9783b..5671b65882c9f8e8c468744886c73f4b545f0655 100644 (file)
@@ -9,6 +9,7 @@
 #define BABELTRACE_CPP_COMMON_LOG_CFG_HPP
 
 #include <babeltrace2/babeltrace.h>
+
 #include "common/assert.h"
 
 namespace bt2_common {
index 66dd7f7ae37ca7da77c7e65d49b03328ce4de536..12e85f44b962dcae7d1b46bce41e7a71628095a6 100644 (file)
@@ -8,8 +8,8 @@
 #define BABELTRACE_CPP_COMMON_MAKE_UNIQUE_HPP
 
 #include <memory>
-#include <utility>
 #include <type_traits>
+#include <utility>
 
 namespace bt2_common {
 
index 7257277fde6f888dc4ed21a0fd7d1f471193f584..5739230447178c3e039bbaf320810a5deb24afda 100644 (file)
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: MIT
  */
 
-#include "uuid.hpp"
 #include "uuid-view.hpp"
+#include "uuid.hpp"
 
 namespace bt2_common {
 
index 70b6e031ff992e9e8e34f6f129b58c6459af1ee8..e39a40e085ae1f00b67c4e9a457c0051628a4a18 100644 (file)
@@ -7,10 +7,10 @@
 #ifndef BABELTRACE_CPP_COMMON_UUID_VIEW_HPP
 #define BABELTRACE_CPP_COMMON_UUID_VIEW_HPP
 
+#include <algorithm>
 #include <array>
 #include <cstdint>
 #include <string>
-#include <algorithm>
 
 #include "common/assert.h"
 #include "common/uuid.h"
index 935091fcd8eee1043503a80499e1a26d76536e69..5f29da4a1c5c54b4102f288480be0d111b880292 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "common/assert.h"
 #include "common/uuid.h"
+
 #include "uuid-view.hpp"
 
 namespace bt2_common {
index 44adc6e0cd9ac11eb18d1f14a69c4ac02f4c7499..2d6b6cbeab1e01a2bb9f2800c68b285fce8892c9 100644 (file)
@@ -8,6 +8,7 @@
 #define SRC_CPP_COMMON_VECTOR_HPP
 
 #include <vector>
+
 #include "common/assert.h"
 
 namespace bt2_common {
index 7014f10201b5a696d914958c93a89713091d8846..ae139d75889f7acb633d449b0fe538cce6c2a26a 100644 (file)
@@ -7,27 +7,29 @@
  * Babeltrace - CTF binary field class reader (BFCR)
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (bfcr->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (bfcr->log_level)
 #define BT_LOG_TAG            "PLUGIN/CTF/BFCR"
 #include "logging/comp-logging.h"
 
-#include <stdlib.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stddef.h>
-#include <stdbool.h>
+#include "common/align.h"
 #include "common/assert.h"
-#include <string.h>
-#include "compat/bitfield.h"
 #include "common/common.h"
-#include <babeltrace2/babeltrace.h>
-#include "common/align.h"
-#include <glib.h>
+#include "compat/bitfield.h"
 
-#include "bfcr.hpp"
 #include "../metadata/ctf-meta.hpp"
+#include "bfcr.hpp"
 
 #define DIV8(_x)                ((_x) >> 3)
 #define BYTES_TO_BITS(_x)       ((_x) *8)
index d7af2e7ebd18f7d5347240e6421b09b4e66314ac..fc745b8b0197bce2f7b5705c10641c7afc0dc173 100644 (file)
 #ifndef CTF_BFCR_H
 #define CTF_BFCR_H
 
-#include <stdint.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
+
 #include <babeltrace2/babeltrace.h>
+
 #include "common/macros.h"
 
 #include "../metadata/ctf-meta.hpp"
index a7f363385a772390f87e2cddf492f77663b5f9a7..ad14a5af3d3b5c9e78d8661be6cee68589d5c461 100644 (file)
@@ -7,16 +7,18 @@
 #ifndef _CTF_AST_H
 #define _CTF_AST_H
 
+#include <glib.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <glib.h>
-#include "common/list.h"
+
 #include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
+
 #include "common/assert.h"
+#include "common/list.h"
+#include "common/macros.h"
 
-#include "decoder.hpp"
 #include "ctf-meta.hpp"
+#include "decoder.hpp"
 
 // the parameter name (of the reentrant 'yyparse' function)
 // data is a pointer to a 'SParserParam' structure
index 423202a94a39831ed115223c7f773b50aed20531..f498c50707509b9c18cace001505d4890ba60d3d 100644 (file)
@@ -5,27 +5,28 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (ctx->self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (ctx->self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL         (ctx->log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/RESOLVE"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
 #include "common/assert.h"
 #include "common/common.h"
-#include <glib.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <glib.h>
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
 
 using field_class_stack_t = GPtrArray;
 
index 9082690a7fdb72cd7d9a40893714f3a4ce639eb4..21df1c2c35e75229623a2b8ee3701286b0c5dbc0 100644 (file)
@@ -4,14 +4,16 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 21360d9d3c659181da4508a4e0e6c171afd5271b..5927e92fd2af6140d0171029dd8b3bbe2a84550e 100644 (file)
@@ -4,13 +4,15 @@
  * Copyright 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index a59d854e649d7dd06c21afcd1b46a12a80b51abb..106d6628f4ca183890227d76c675efa1832de201 100644 (file)
@@ -4,22 +4,24 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (log_cfg->self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (log_cfg->self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL         (log_cfg->log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/UPDATE-DEF-CC"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
 #include "common/assert.h"
-#include <glib.h>
-#include <stdint.h>
-#include <string.h>
-#include <inttypes.h>
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
 
 static inline int find_mapped_clock_class(struct ctf_field_class *fc,
                                           struct ctf_clock_class **clock_class,
index 4a4ea8faa2583f5651de6b1b9ad7c2751d95e361..3ac517459bd77e7d69f6833bd00c5d22d818a02a 100644 (file)
@@ -4,16 +4,17 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
-#include "compat/glib.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #include "common/assert.h"
+#include "common/macros.h"
+#include "compat/glib.h"
 
 #include "ctf-meta-visitors.hpp"
 
index c032f085a28a79cde9d474bf9d66eb96124edd7d..6f4138afba522d8e061e365d95cf48f7f1ef1a49 100644 (file)
@@ -4,13 +4,15 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 40cd1bbdcd5b9b89c332d9b55551c27ccd54537a..9dec05f20af7129b9ae222cb4ae84f3607514532 100644 (file)
@@ -4,13 +4,15 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 8f6280e1eb8c41ede61a0c79c2c08502eb953822..2e59529faa037f9423dd456b108f5eeffabcbdd2 100644 (file)
@@ -4,13 +4,15 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 274cdcc9cc1f5bb489fb778b0c4caffcaccf2c59..a51b03cfdfb6d3c199fdf6e29e0e2ecac8d1c023 100644 (file)
@@ -4,13 +4,15 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/assert.h"
 #include <glib.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
-#include <inttypes.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 29f5471a6e446e664b7801f8b7f51ff7720f1847..c11a0b944c8f2affdc4b62e5d9c9cbc0a23320cc 100644 (file)
@@ -4,22 +4,24 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (log_cfg->self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (log_cfg->self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL         (log_cfg->log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/VALIDATE"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
 #include "common/assert.h"
-#include <glib.h>
-#include <stdint.h>
-#include <string.h>
-#include <inttypes.h>
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
 
 static int validate_stream_class(struct ctf_stream_class *sc, struct meta_log_config *log_cfg)
 {
index 91dd62fab6a9ce16d1e4d4dcb4240f2328a4bee7..9dd30301fd710f1c78a99465aa70559aaef3ba20 100644 (file)
@@ -8,6 +8,7 @@
 #define _CTF_META_VISITORS_H
 
 #include <babeltrace2/babeltrace.h>
+
 #include "common/macros.h"
 
 #include "ctf-meta.hpp"
index 0e6f776b7c3cd8b39c380393c7ecf380de7da35a..6b31f88e6153a8600e00d3d2886ef60d6fcbc72d 100644 (file)
@@ -4,21 +4,23 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_cfg->log_level)
 #define BT_LOG_TAG            "PLUGIN/CTF/META/WARN-MEANINGLESS-HEADER-FIELDS"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
 #include "common/assert.h"
-#include <glib.h>
-#include <stdint.h>
-#include <string.h>
-#include <inttypes.h>
+#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
 
 static inline void warn_meaningless_field(const char *name, const char *scope_name,
                                           struct meta_log_config *log_cfg)
index 24dc01a5527b8a44aa85841d3e70a8875ba6540d..b2d1c5521a5b94747709fe20587c33ddbb162edc 100644 (file)
@@ -7,15 +7,17 @@
 #ifndef _CTF_META_H
 #define _CTF_META_H
 
-#include <babeltrace2/babeltrace.h>
-#include "common/common.h"
-#include "common/uuid.h"
-#include "common/assert.h"
 #include <glib.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
 
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/common.h"
+#include "common/uuid.h"
+
 enum ctf_field_class_type
 {
     CTF_FIELD_CLASS_TYPE_INT,
index 4cc964ae33cb71de2f9027a4161d45b4a9e462a2..c89ee8b18985b77de6d2a2ef605135c581e31cae 100644 (file)
@@ -4,30 +4,31 @@
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       self_comp
 #define BT_COMP_LOG_SELF_COMP_CLASS self_comp_class
 #define BT_LOG_OUTPUT_LEVEL         log_level
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/DECODER-DECODE-PACKET"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include "decoder-packetized-file-stream-to-buf.hpp"
-
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <inttypes.h>
 #include "common/assert.h"
 #include "common/uuid.h"
 #include "compat/memstream.h"
-#include <babeltrace2/babeltrace.h>
-#include <glib.h>
-#include <string.h>
 
 #include "ast.hpp"
+#include "decoder-packetized-file-stream-to-buf.hpp"
 #include "decoder.hpp"
 #include "scanner.hpp"
-#include "logging.hpp"
 
 #define TSDL_MAGIC 0x75d11d57
 
index d1f1c2dedc9c5d1057fd8e6f64bb4e8564c1f9f2..cd61678faa1d7e6e8860c54aa9aeab058a7e904a 100644 (file)
@@ -4,30 +4,32 @@
  * Copyright 2016-2017 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (mdec->config.self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (mdec->config.self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL         (mdec->config.log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/DECODER"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <inttypes.h>
 #include "common/assert.h"
 #include "common/uuid.h"
 #include "compat/memstream.h"
-#include <babeltrace2/babeltrace.h>
-#include <glib.h>
-#include <string.h>
 
 #include "ast.hpp"
+#include "decoder-packetized-file-stream-to-buf.hpp"
 #include "decoder.hpp"
-#include "scanner.hpp"
-#include "logging.hpp"
 #include "parser-wrap.hpp"
-#include "decoder-packetized-file-stream-to-buf.hpp"
+#include "scanner.hpp"
 
 #define TSDL_MAGIC 0x75d11d57
 
index 33caebef4e8aabd79fcd98219a3ed33a8ba579c3..7c5bdffb44fc10f74935cfb5c940ed5f8c21a23f 100644 (file)
@@ -7,8 +7,8 @@
 #ifndef _METADATA_DECODER_H
 #define _METADATA_DECODER_H
 
-#include <stdint.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 
 #include <babeltrace2/babeltrace.h>
index 2ee0f2dbdec0eadcc149835bc431e6c3a4fe2ad6..7c2d5d38d54906cb78ac881cb9e677c4c0c33d2b 100644 (file)
@@ -7,15 +7,16 @@
  * Common Trace Formal Lexer
  */
 
+#include <ctype.h>
+#include <stdio.h>
+
 #define BT_LOG_OUTPUT_LEVEL ctf_plugin_metadata_log_level
 #define BT_LOG_TAG "PLUGIN-CTF-METADATA-LEXER"
 #include "plugins/ctf/common/metadata/logging.hpp"
 
-#include <stdio.h>
-#include <ctype.h>
-#include "plugins/ctf/common/metadata/scanner.hpp"
-#include "plugins/ctf/common/metadata/parser-wrap.hpp"
 #include "plugins/ctf/common/metadata/ast.hpp"
+#include "plugins/ctf/common/metadata/parser-wrap.hpp"
+#include "plugins/ctf/common/metadata/scanner.hpp"
 
 #define YY_FATAL_ERROR(_msg)   BT_LOGF_STR(_msg)
 
index a62f1e1eb9a8693848a580d215f841197430264b..d2cb03f61d4831d3fe325b2e5da6bb72d55edf39 100644 (file)
@@ -8,6 +8,7 @@
 #define CTF_METADATA_LOGGING_H
 
 #include <babeltrace2/babeltrace.h>
+
 #include "logging/log.h"
 
 /*
index 1d808384e9807a06683dc73cec581019707244a8..2eb938389f7acdb87b9e6bfa3af1eb3f7b459fa9 100644 (file)
@@ -6,16 +6,17 @@
  * Common Trace Format Object Stack.
  */
 
+#include <stdlib.h>
+
 #define BT_LOG_OUTPUT_LEVEL ctf_plugin_metadata_log_level
 #define BT_LOG_TAG          "PLUGIN/CTF/META/OBJSTACK"
 #include "logging.hpp"
 
-#include "objstack.hpp"
-
-#include <stdlib.h>
+#include "common/align.h"
 #include "common/list.h"
 #include "common/macros.h"
-#include "common/align.h"
+
+#include "objstack.hpp"
 
 #define OBJSTACK_ALIGN    8 /* Object stack alignment */
 #define OBJSTACK_INIT_LEN 128
index 82dd8ccd3fa06921c4a16af77e934d65cfafa857..eb6e32c7a94856c522a70c6e7e8ea6220deded64 100644 (file)
@@ -7,25 +7,25 @@
  * Common Trace Format Metadata Grammar.
  */
 
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <glib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
 #define BT_LOG_OUTPUT_LEVEL ctf_plugin_metadata_log_level
 #define BT_LOG_TAG "PLUGIN/CTF/META/PARSER"
 #include "plugins/ctf/common/metadata/logging.hpp"
 
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <glib.h>
-#include <errno.h>
-#include <inttypes.h>
 #include "common/list.h"
 #include "common/assert.h"
-#include "plugins/ctf/common/metadata/scanner.hpp"
+
 #include "plugins/ctf/common/metadata/ast.hpp"
 #include "plugins/ctf/common/metadata/objstack.hpp"
-
 #include "plugins/ctf/common/metadata/parser-wrap.hpp"
 
 /*
@@ -1048,6 +1048,8 @@ void ctf_scanner_free(struct ctf_scanner *scanner)
 #ifndef ALLOW_INCLUDE_PARSER_H
 # error "Don't include parser.h directly, include parser-wrap.h instead."
 #endif
+
+#include "plugins/ctf/common/metadata/scanner.hpp"
 }
 
 %code provides {
index 8869f21c3c877a9e2576e8731d4c5a9052c22bdc..15e8e4ae6a46834534dadfd762bebab740c18640 100644 (file)
@@ -8,7 +8,9 @@
 #define _CTF_SCANNER_H
 
 #include <stdio.h>
+
 #include "common/macros.h"
+
 #include "ast.hpp"
 
 #ifndef YY_TYPEDEF_YY_SCANNER_T
index 80b1b36d3169d0aaa16ce203304d4e53c9bd7388..e9483a994a7058d8821d80bf49170167d374b252 100644 (file)
@@ -7,34 +7,37 @@
  * Common Trace Format metadata visitor (generates CTF IR objects).
  */
 
+#include <string>
+
+#include <ctype.h>
+#include <errno.h>
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP       (ctx->log_cfg.self_comp)
 #define BT_COMP_LOG_SELF_COMP_CLASS (ctx->log_cfg.self_comp_class)
 #define BT_LOG_OUTPUT_LEVEL         (ctx->log_cfg.log_level)
 #define BT_LOG_TAG                  "PLUGIN/CTF/META/IR-VISITOR"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <ctype.h>
 #include "common/assert.h"
-#include <glib.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <string>
 #include "common/common.h"
 #include "common/uuid.h"
 #include "compat/endian.h"
-#include <babeltrace2/babeltrace.h>
 
-#include "logging.hpp"
-#include "scanner.hpp"
 #include "ast.hpp"
-#include "decoder.hpp"
-#include "ctf-meta.hpp"
 #include "ctf-meta-visitors.hpp"
+#include "ctf-meta.hpp"
+#include "decoder.hpp"
+#include "scanner.hpp"
 
 /* Bit value (left shift) */
 #define _BV(_val) (1 << (_val))
index 724ada65f2d8b55de8b813fc763faf6ea4799d87..3c0f095d81fd48d5c19984f7f2950e807bdf9c2a 100644 (file)
@@ -6,24 +6,26 @@
  * Common Trace Format Metadata Parent Link Creator.
  */
 
+#include <errno.h>
+#include <glib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_cfg->log_level)
 #define BT_LOG_TAG            "PLUGIN/CTF/META/PARENT-LINKS-VISITOR"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
 #include "common/assert.h"
-#include <glib.h>
-#include <inttypes.h>
-#include <errno.h>
-#include "common/macros.h"
 #include "common/list.h"
-#include "scanner.hpp"
+#include "common/macros.h"
+
 #include "ast.hpp"
-#include "logging.hpp"
+#include "scanner.hpp"
 
 static int ctf_visitor_unary_expression(int depth, struct ctf_node *node,
                                         struct meta_log_config *log_cfg)
index c46e82830a34627ca877f4bf87cafb78721972e1..93631fa4e0b9727d7fffde27e871f405b6506d1d 100644 (file)
@@ -6,23 +6,25 @@
  * Common Trace Format Metadata Semantic Validator.
  */
 
+#include <errno.h>
+#include <glib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_cfg->log_level)
 #define BT_LOG_TAG            "PLUGIN/CTF/META/SEMANTIC-VALIDATOR-VISITOR"
+#include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
 #include "common/assert.h"
-#include <glib.h>
-#include <inttypes.h>
-#include <errno.h>
 #include "common/list.h"
-#include "scanner.hpp"
+
 #include "ast.hpp"
-#include "logging.hpp"
+#include "scanner.hpp"
 
 #define _bt_list_first_entry(ptr, type, member) bt_list_entry((ptr)->next, type, member)
 
index 5f38ec6c0dd5ebdac1397e228086d07558d7840b..38305c84455fed8dcbb2cf667c095d0a320085df 100644 (file)
@@ -7,25 +7,27 @@
  * Babeltrace - CTF message iterator
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (msg_it->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (msg_it->log_level)
 #define BT_LOG_TAG            "PLUGIN/CTF/MSG-ITER"
 #include "logging/comp-logging.h"
 
-#include <stdint.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stddef.h>
-#include <stdbool.h>
 #include "common/assert.h"
-#include <string.h>
-#include <babeltrace2/babeltrace.h>
 #include "common/common.h"
-#include <glib.h>
-#include <stdlib.h>
 
-#include "msg-iter.hpp"
 #include "../bfcr/bfcr.hpp"
+#include "msg-iter.hpp"
 
 struct ctf_msg_iter;
 
index 15a952d2fadcf98c182e200251a29a005103fa3f..830f96c7a0af4ec4f6abd812af2e2c5c482c923d 100644 (file)
 #define CTF_MSG_ITER_H
 
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <stddef.h>
+
 #include <babeltrace2/babeltrace.h>
+
 #include "common/macros.h"
 
 #include "../metadata/ctf-meta.hpp"
index 90c8d409127df1104d53f721bfc4ba2823638a3c..4e89da7b1289e80d78d484329069323192e635a3 100644 (file)
@@ -10,6 +10,7 @@
 #define CTF_BTR_PRINT_H
 
 #include <stdio.h>
+
 #include "common/macros.h"
 
 #define PERR(fmt, ...)                                                                             \
index 8795b4511a0d2aad87ba1a2e5934324ade7ed50d..4cf009c11e5677cf1dec97429c4a832ba159beea 100644 (file)
@@ -7,15 +7,17 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
 
-#include <babeltrace2/babeltrace.h>
-#include "common/common.h"
-#include "common/assert.h"
-#include "common/uuid.h"
+#include <ctype.h>
 #include <glib.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
-#include <stdbool.h>
-#include <ctype.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/assert.h"
+#include "common/common.h"
+#include "common/uuid.h"
 
 enum fs_sink_ctf_field_class_type
 {
index e14878837914dbcdf59f17f9d31188923daea6b6..a72e71b9c2a59d0f45c7d9262eed00f0612ed345 100644 (file)
@@ -4,22 +4,24 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (stream->trace->fs_sink->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (stream->log_level)
 #define BT_LOG_TAG            "PLUGIN/SINK.CTF.FS/STREAM"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <glib.h>
 #include "common/assert.h"
-#include "ctfser/ctfser.h"
 #include "compat/endian.h"
+#include "ctfser/ctfser.h"
 
-#include "fs-sink.hpp"
-#include "fs-sink-trace.hpp"
 #include "fs-sink-stream.hpp"
+#include "fs-sink-trace.hpp"
+#include "fs-sink.hpp"
 #include "translate-trace-ir-to-ctf-ir.hpp"
 
 void fs_sink_stream_destroy(struct fs_sink_stream *stream)
index cb95c08f2cfe3b9f5e9dddd79e287dda8993c0eb..16f931870773755545c5613edaf154b08655f5bb 100644 (file)
@@ -7,13 +7,15 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_STREAM_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_STREAM_H
 
-#include "common/macros.h"
-#include <babeltrace2/babeltrace.h>
-#include "ctfser/ctfser.h"
 #include <glib.h>
 #include <stdbool.h>
 #include <stdint.h>
 
+#include <babeltrace2/babeltrace.h>
+
+#include "common/macros.h"
+#include "ctfser/ctfser.h"
+
 #include "fs-sink-ctf-meta.hpp"
 
 struct fs_sink_trace;
index 1fad4a48ea5af064c6d2bd2e355aee6f8acd8bbc..0e2fceec6a5e5c9f4fa94929e4550be40c2e2800 100644 (file)
@@ -4,23 +4,25 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (trace->fs_sink->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (trace->log_level)
 #define BT_LOG_TAG            "PLUGIN/SINK.CTF.FS/TRACE"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <glib.h>
 #include "common/assert.h"
 #include "ctfser/ctfser.h"
 
-#include "translate-trace-ir-to-ctf-ir.hpp"
-#include "translate-ctf-ir-to-tsdl.hpp"
-#include "fs-sink.hpp"
-#include "fs-sink-trace.hpp"
 #include "fs-sink-stream.hpp"
+#include "fs-sink-trace.hpp"
+#include "fs-sink.hpp"
+#include "translate-ctf-ir-to-tsdl.hpp"
+#include "translate-trace-ir-to-ctf-ir.hpp"
 
 /*
  * Sanitizes `path` so as to:
index 0f2bdb4c867b88599e460809d2621d6b6ed218dd..5ddb678d11d7a1af638e9608da02fff1b651840e 100644 (file)
@@ -7,12 +7,14 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H
 
-#include "common/macros.h"
-#include <babeltrace2/babeltrace.h>
-#include "ctfser/ctfser.h"
 #include <glib.h>
 #include <stdint.h>
 
+#include <babeltrace2/babeltrace.h>
+
+#include "common/macros.h"
+#include "ctfser/ctfser.h"
+
 #include "fs-sink-ctf-meta.hpp"
 
 struct fs_sink_comp;
index e99f130d9b4ecf78b75ab53a82cdc88089d39646..d7109e0f0e0e603baef33e6ca683830813c268cd 100644 (file)
@@ -4,25 +4,28 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (fs_sink->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (fs_sink->log_level)
 #define BT_LOG_TAG            "PLUGIN/SINK.CTF.FS"
 #include "logging/comp-logging.h"
 
-#include <babeltrace2/babeltrace.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <glib.h>
 #include "common/assert.h"
 #include "ctfser/ctfser.h"
+
 #include "plugins/common/param-validation/param-validation.h"
 
-#include "fs-sink.hpp"
-#include "fs-sink-trace.hpp"
-#include "fs-sink-stream.hpp"
 #include "fs-sink-ctf-meta.hpp"
-#include "translate-trace-ir-to-ctf-ir.hpp"
+#include "fs-sink-stream.hpp"
+#include "fs-sink-trace.hpp"
+#include "fs-sink.hpp"
 #include "translate-ctf-ir-to-tsdl.hpp"
+#include "translate-trace-ir-to-ctf-ir.hpp"
 
 static const char * const in_port_name = "in";
 
index d853ccb66449290ae15d20d6ebd69cbea4b09d8e..355c4f45d8778b620ce67cbd66449c807702d3a6 100644 (file)
@@ -7,10 +7,12 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
 
-#include "common/macros.h"
-#include <babeltrace2/babeltrace.h>
-#include <stdbool.h>
 #include <glib.h>
+#include <stdbool.h>
+
+#include <babeltrace2/babeltrace.h>
+
+#include "common/macros.h"
 
 struct fs_sink_comp
 {
index b3bbfbe1986b7df6d86b2bc51a7298016f07c84a..d3e5083f0e6073a09de8be450ac5f55ea8f426af 100644 (file)
@@ -4,18 +4,19 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include "translate-ctf-ir-to-tsdl.hpp"
-
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include <stdio.h>
+#include <glib.h>
 #include <stdbool.h>
+#include <stdio.h>
 #include <string.h>
-#include <glib.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #include "common/assert.h"
+#include "common/macros.h"
 #include "compat/endian.h"
 
 #include "fs-sink-ctf-meta.hpp"
+#include "translate-ctf-ir-to-tsdl.hpp"
 
 struct ctx
 {
index b9ddec72a6bb2ab48f0910cdb36065e3aa618d98..1cdefc8173a8899210e86b8f8fa10798c264fa21 100644 (file)
@@ -10,6 +10,7 @@
 #include <glib.h>
 
 #include "common/macros.h"
+
 #include "fs-sink-ctf-meta.hpp"
 
 void translate_trace_ctf_ir_to_tsdl(struct fs_sink_ctf_trace *trace, GString *tsdl);
index 80adcc3aa3bc32f3729a2c312f6aedb24927351c..88bff0bf7c0806de89c0afe340328ad9b67b22fb 100644 (file)
@@ -4,25 +4,27 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <string>
+
+#include <glib.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (ctx->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (ctx->log_level)
 #define BT_LOG_TAG            "PLUGIN/SINK.CTF.FS/TRANSLATE-TRACE-IR-TO-CTF-IR"
 #include "logging/comp-logging.h"
 
-#include "translate-trace-ir-to-ctf-ir.hpp"
-
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "common/common.h"
 #include "common/assert.h"
-#include <stdio.h>
-#include <stdbool.h>
-#include <string.h>
-#include <string>
-#include <glib.h>
+#include "common/common.h"
+#include "common/macros.h"
 
-#include "fs-sink.hpp"
 #include "fs-sink-ctf-meta.hpp"
+#include "fs-sink.hpp"
+#include "translate-trace-ir-to-ctf-ir.hpp"
 
 struct field_path_elem
 {
index c56d3abe7c6d9eb04022ffe263dc3074a8340830..736a160a714478485c1becc4b398339697fb736b 100644 (file)
@@ -7,11 +7,12 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_TRACE_IR_TO_CTF_IR_H
 
-#include "common/macros.h"
 #include <babeltrace2/babeltrace.h>
 
-#include "fs-sink.hpp"
+#include "common/macros.h"
+
 #include "fs-sink-ctf-meta.hpp"
+#include "fs-sink.hpp"
 
 int try_translate_event_class_trace_ir_to_ctf_ir(struct fs_sink_comp *fs_sink,
                                                  struct fs_sink_ctf_stream_class *sc,
index 482383b1c7819d91fd57a02f84c1c311fb0249d4..d48984428377d03126b79de2c3b7e41a1feb59c5 100644 (file)
@@ -6,27 +6,29 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_level)
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS/DS"
 #include "logging/comp-logging.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <inttypes.h>
-#include "compat/mman.h"
-#include "compat/endian.h"
-#include <babeltrace2/babeltrace.h>
+#include "common/assert.h"
 #include "common/common.h"
-#include "file.hpp"
-#include "metadata.hpp"
+#include "compat/endian.h"
+#include "compat/mman.h"
+
 #include "../common/msg-iter/msg-iter.hpp"
-#include "common/assert.h"
 #include "data-stream-file.hpp"
-#include <string.h>
+#include "file.hpp"
+#include "metadata.hpp"
 
 static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file)
 {
index a163f1dc88ef040a13aa58c1e07605a7b591ffbd..833fde25fe6b3e890855d856956d03f486406e0e 100644 (file)
@@ -7,12 +7,14 @@
 #ifndef CTF_FS_DS_FILE_H
 #define CTF_FS_DS_FILE_H
 
-#include <stdio.h>
-#include <stdbool.h>
 #include <glib.h>
-#include "common/macros.h"
+#include <stdbool.h>
+#include <stdio.h>
+
 #include <babeltrace2/babeltrace.h>
 
+#include "common/macros.h"
+
 #include "../common/msg-iter/msg-iter.hpp"
 #include "lttng-index.hpp"
 
index 45bdd3010f1adf34ce0a3b5d319281b0e118ee86..947e09ddc283b6391c1d4e652beb809ef638c490 100644 (file)
@@ -4,16 +4,17 @@
  * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #define BT_COMP_LOG_SELF_COMP (file->self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (file->log_level)
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS/FILE"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <glib.h>
 #include "file.hpp"
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file)
index 79242e753abf5dbdd4889d7724dcfbb60ec3c055..c3b524a36a5fc881e9afc2aba498cabbb02d7e04 100644 (file)
@@ -7,9 +7,11 @@
 #ifndef CTF_FS_FILE_H
 #define CTF_FS_FILE_H
 
-#include <stdio.h>
 #include <glib.h>
+#include <stdio.h>
+
 #include "common/macros.h"
+
 #include "fs.hpp"
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file);
index aa49faeb1a8f848ae6bad289c0e04365edd38a7c..ed808d31dd8c1413c54112a1ad4418c1b7d2201a 100644 (file)
@@ -7,27 +7,31 @@
  * Babeltrace CTF file system Reader Component
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdbool.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP self_comp
 #define BT_LOG_OUTPUT_LEVEL   log_level
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS"
 #include "logging/comp-logging.h"
 
+#include "common/assert.h"
 #include "common/common.h"
-#include <babeltrace2/babeltrace.h>
 #include "common/uuid.h"
-#include <glib.h>
-#include "common/assert.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "fs.hpp"
-#include "metadata.hpp"
-#include "data-stream-file.hpp"
-#include "file.hpp"
-#include "../common/metadata/decoder.hpp"
+
+#include "plugins/common/param-validation/param-validation.h"
+
 #include "../common/metadata/ctf-meta-configure-ir-trace.hpp"
+#include "../common/metadata/decoder.hpp"
 #include "../common/msg-iter/msg-iter.hpp"
+#include "data-stream-file.hpp"
+#include "file.hpp"
+#include "fs.hpp"
+#include "metadata.hpp"
 #include "query.hpp"
-#include "plugins/common/param-validation/param-validation.h"
 
 struct tracer_info
 {
index 0efb203937ccd78160c3067b474c11148ffc4565..0ad225327173f89c117c0d97799aa2df6c759266 100644 (file)
 #define BABELTRACE_PLUGIN_CTF_FS_H
 
 #include <stdbool.h>
-#include "common/macros.h"
+
 #include <babeltrace2/babeltrace.h>
+
+#include "common/macros.h"
+
+#include "../common/metadata/decoder.hpp"
 #include "data-stream-file.hpp"
 #include "metadata.hpp"
-#include "../common/metadata/decoder.hpp"
 
 extern bool ctf_fs_debug;
 
index 644f57dec17c5c34f7610f9213fbedf458570973..46f4a4d19195fff7a885cd7379e77052b9b6ad26 100644 (file)
@@ -10,6 +10,7 @@
 #define LTTNG_INDEX_H
 
 #include <stddef.h>
+
 #include "compat/limits.h"
 
 #define CTF_INDEX_MAGIC    0xC1F1DCC1
index 5e6f7d108a2ec860818aa81c11d163118c06d29f..562ef981a71c2cda175b613fe5190b408a6c0612 100644 (file)
@@ -5,24 +5,26 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
+#include <glib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP self_comp
 #define BT_LOG_OUTPUT_LEVEL   log_level
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS/META"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
 #include "common/assert.h"
-#include <glib.h>
 #include "common/uuid.h"
 #include "compat/memstream.h"
-#include <babeltrace2/babeltrace.h>
 
-#include "fs.hpp"
+#include "../common/metadata/decoder.hpp"
 #include "file.hpp"
+#include "fs.hpp"
 #include "metadata.hpp"
-#include "../common/metadata/decoder.hpp"
 
 FILE *ctf_fs_metadata_open_file(const char *trace_path, bt_logging_level log_level,
                                 bt_self_component_class *comp_class)
index e02983934304027e25260461fefb348e4e3cf506..d8fde107f3cdfdc6d8712b15566a9faff1f567d2 100644 (file)
@@ -7,12 +7,14 @@
 #ifndef CTF_FS_METADATA_H
 #define CTF_FS_METADATA_H
 
+#include <glib.h>
 #include <stdbool.h>
 #include <stdio.h>
-#include <glib.h>
-#include "common/macros.h"
+
 #include <babeltrace2/babeltrace.h>
 
+#include "common/macros.h"
+
 #define CTF_FS_METADATA_FILENAME "metadata"
 
 struct ctf_fs_trace;
index 2c758c25dbd91932302a9e40707b0fcfcf219155..3e9c2a676099ea103ed8c0b40c48888aea50e160 100644 (file)
@@ -6,25 +6,28 @@
  * Babeltrace CTF file system Reader Component queries
  */
 
+#include <fcntl.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_LOG_OUTPUT_LEVEL log_level
 #define BT_LOG_TAG          "PLUGIN/SRC.CTF.FS/QUERY"
+#include "logging/comp-logging.h"
 #include "logging/log.h"
 
-#include "query.hpp"
-#include <stdbool.h>
-#include <glib.h>
-#include <glib/gstdio.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include "common/assert.h"
-#include "metadata.hpp"
-#include "../common/metadata/decoder.hpp"
 #include "common/common.h"
 #include "common/macros.h"
-#include <babeltrace2/babeltrace.h>
+
+#include "../common/metadata/decoder.hpp"
 #include "fs.hpp"
-#include "logging/comp-logging.h"
+#include "metadata.hpp"
+#include "query.hpp"
 
 #define METADATA_TEXT_SIG "/* CTF 1.8"
 
index cadf83dbc751b9d67b065fca9ef56fcd6b87c34f..3b17fb8a72d4806df8615116f7dc68738be9ac69 100644 (file)
@@ -9,9 +9,10 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_QUERY_H
 #define BABELTRACE_PLUGIN_CTF_FS_QUERY_H
 
-#include "common/macros.h"
 #include <babeltrace2/babeltrace.h>
 
+#include "common/macros.h"
+
 bt_component_class_query_method_status
 metadata_info_query(bt_self_component_class_source *comp_class, const bt_value *params,
                     bt_logging_level log_level, const bt_value **result);
index a9502156effe5cadf6f772290984dcf4b7bc162d..5ab21297db99b79899ea0389c7fd6a6b2aad3a4b 100644 (file)
@@ -7,22 +7,22 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
-#define BT_COMP_LOG_SELF_COMP self_comp
-#define BT_LOG_OUTPUT_LEVEL   log_level
-#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE/DS"
-#include "logging/comp-logging.h"
-
+#include <glib.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <glib.h>
-
 #include <babeltrace2/babeltrace.h>
 
-#include "../common/msg-iter/msg-iter.hpp"
+#define BT_COMP_LOG_SELF_COMP self_comp
+#define BT_LOG_OUTPUT_LEVEL   log_level
+#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE/DS"
+#include "logging/comp-logging.h"
+
 #include "common/assert.h"
 #include "compat/mman.h"
+
+#include "../common/msg-iter/msg-iter.hpp"
 #include "data-stream.hpp"
 
 #define STREAM_NAME_PREFIX "stream-"
index c16eae87fe83f604a80667f02763a1f8b5832377..28b3b95fd333e96bac97258a2ad6dfaa677518b9 100644 (file)
@@ -7,10 +7,9 @@
 #ifndef LTTNG_LIVE_DATA_STREAM_H
 #define LTTNG_LIVE_DATA_STREAM_H
 
-#include <stdio.h>
-#include <stdint.h>
-
 #include <glib.h>
+#include <stdint.h>
+#include <stdio.h>
 
 #include "../common/msg-iter/msg-iter.hpp"
 #include "lttng-live.hpp"
index 826a1b532996e1fddc9fb988bf8c2fbeff99b09b..5f33ab225f1ab4169379d4781cc80751e79db4c8 100644 (file)
@@ -8,27 +8,27 @@
  * Babeltrace CTF LTTng-live Client Component
  */
 
-#define BT_COMP_LOG_SELF_COMP self_comp
-#define BT_LOG_OUTPUT_LEVEL   log_level
-#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE"
-#include "logging/comp-logging.h"
-
+#include <glib.h>
 #include <inttypes.h>
 #include <stdbool.h>
 #include <unistd.h>
 
-#include <glib.h>
+#include <babeltrace2/babeltrace.h>
+
+#define BT_COMP_LOG_SELF_COMP self_comp
+#define BT_LOG_OUTPUT_LEVEL   log_level
+#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE"
+#include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include <babeltrace2/babeltrace.h>
 #include "compat/compiler.h"
 
 #include "plugins/common/muxing/muxing.h"
 #include "plugins/common/param-validation/param-validation.h"
 
 #include "data-stream.hpp"
-#include "metadata.hpp"
 #include "lttng-live.hpp"
+#include "metadata.hpp"
 
 #define MAX_QUERY_SIZE                     (256 * 1024)
 #define URL_PARAM                          "url"
index 5e2e3686969477007768bb1c3520946a729617cc..945db0f6a57cdaddd76e718d3e91da1f2504cda6 100644 (file)
 #ifndef BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H
 #define BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H
 
+#include <glib.h>
 #include <stdbool.h>
 #include <stdint.h>
 
-#include <glib.h>
-
 #include <babeltrace2/babeltrace.h>
 
 #include "common/macros.h"
+
 #include "../common/metadata/decoder.hpp"
 #include "../common/msg-iter/msg-iter.hpp"
 #include "viewer-connection.hpp"
index 0d1911ad8883b9af0efcfccbefc160b4e021425b..f8ae6a21a8725ad91c9add72f23d40f347519bd2 100644 (file)
@@ -10,6 +10,7 @@
 #define LTTNG_VIEWER_ABI_H
 
 #include <stdint.h>
+
 #include "compat/limits.h"
 
 #define LTTNG_VIEWER_PATH_MAX      4096
index e83e4b6fb18e021e8595a6ab2c94cbbffa52ca31..7a44b2d0b1617f18632262b102493666d43ad2dc 100644 (file)
@@ -6,22 +6,24 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
+#include <glib.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP self_comp
 #define BT_LOG_OUTPUT_LEVEL   log_level
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE/META"
 #include "logging/comp-logging.h"
 
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <glib.h>
 #include "compat/memstream.h"
-#include <babeltrace2/babeltrace.h>
 
-#include "metadata.hpp"
-#include "../common/metadata/decoder.hpp"
 #include "../common/metadata/ctf-meta-configure-ir-trace.hpp"
+#include "../common/metadata/decoder.hpp"
+#include "metadata.hpp"
 
 #define TSDL_MAGIC 0x75d11d57
 
index 805501fb134990ca626255dce12bd96e358d17f6..eb4bd1291d15245b01e67112ea80b54363329d0a 100644 (file)
@@ -5,12 +5,8 @@
  * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define BT_COMP_LOG_SELF_COMP (viewer_connection->self_comp)
-#define BT_LOG_OUTPUT_LEVEL   (viewer_connection->log_level)
-#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER"
-#include "logging/comp-logging.h"
-
 #include <fcntl.h>
+#include <glib.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <glib.h>
+#include <babeltrace2/babeltrace.h>
+
+#define BT_COMP_LOG_SELF_COMP (viewer_connection->self_comp)
+#define BT_LOG_OUTPUT_LEVEL   (viewer_connection->log_level)
+#define BT_LOG_TAG            "PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER"
+#include "logging/comp-logging.h"
 
-#include "compat/socket.h"
-#include "compat/endian.h"
-#include "compat/compiler.h"
 #include "common/common.h"
-#include <babeltrace2/babeltrace.h>
+#include "compat/compiler.h"
+#include "compat/endian.h"
+#include "compat/socket.h"
 
+#include "data-stream.hpp"
 #include "lttng-live.hpp"
-#include "viewer-connection.hpp"
 #include "lttng-viewer-abi.hpp"
-#include "data-stream.hpp"
 #include "metadata.hpp"
+#include "viewer-connection.hpp"
 
 #define viewer_handle_send_recv_status(_self_comp, _self_comp_class, _status, _action, _msg_str)   \
     do {                                                                                           \
index 2943e1099c1d73c0e31e1f6e78628a17b2ad57f4..1ad239e447f6a8f7ee605c42b1a514a33eada4b0 100644 (file)
@@ -7,12 +7,11 @@
 #ifndef LTTNG_LIVE_VIEWER_CONNECTION_H
 #define LTTNG_LIVE_VIEWER_CONNECTION_H
 
+#include <glib.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 
-#include <glib.h>
-
 #include <babeltrace2/babeltrace.h>
 
 #include "common/macros.h"
index 835d16c32d6ee1ab82135b1dc6bc241e703d64d1..e51266197f140cd87a3ddc93bbcecc3bb462e0c5 100644 (file)
@@ -8,8 +8,8 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "fs-src/fs.hpp"
 #include "fs-sink/fs-sink.hpp"
+#include "fs-src/fs.hpp"
 #include "lttng-live/lttng-live.hpp"
 
 #ifndef BT_BUILT_IN_PLUGINS
index c348c5566c37e545e75583c2a50a8e8028d2b4e6..83182f9ab566a1682680f20c2c685dd61d177a08 100644 (file)
@@ -7,6 +7,7 @@
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
+
 #include "utils.hpp"
 
 static void trigger_graph_mip_version(void)
index 7ee486be37e763649b7246f725f98bdf242b4373..53984752a85576deab3cb565ea3b04dccc0f3c30 100644 (file)
@@ -4,18 +4,21 @@
  * Copyright (C) 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <stdlib.h>
+#include <iostream>
+
+#include <assert.h>
+#include <glib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <assert.h>
+
 #include <babeltrace2/babeltrace.h>
-#include <glib.h>
-#include <iostream>
 
 #include "common/assert.h"
 #include "cpp-common/nlohmann/json.hpp"
-#include "utils.hpp"
+
 #include "../utils/run-in.hpp"
+#include "utils.hpp"
 
 static void run_trigger(const struct cond_trigger *trigger)
 {
index 9899f86ee29cab85dbf119224415c10e648e5b9b..0bc8bb3b745564b4f39c37686859d84053b7a2eb 100644 (file)
@@ -4,10 +4,13 @@
  * Copyright (C) 2023 EfficiOS Inc.
  */
 
+#include <cstring>
+
+#include "common/assert.h"
+
 #include "utils/run-in.hpp"
+
 #include "tap/tap.h"
-#include "common/assert.h"
-#include <cstring>
 
 static const int NR_TESTS = 2;
 
index c57c8c0978416c1c051dc8e03e4bef8b6f7b8a28..01913872d209e19b303ebbbbd5812e90f02c40d4 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <utility>
 
-#include "run-in.hpp"
 #include "common/assert.h"
 
+#include "run-in.hpp"
+
 namespace {
 
 struct RunInData final
index 2220b97732e4d629f6b8797f08b70432f123bc92..0855e05e062ba697b3f9b4b4b51ad3a11833e634 100644 (file)
@@ -7,9 +7,10 @@
 #ifndef TESTS_LIB_UTILS_H
 #define TESTS_LIB_UTILS_H
 
-#include <babeltrace2/babeltrace.h>
 #include <functional>
 
+#include <babeltrace2/babeltrace.h>
+
 using RunInCompClsQueryFunc = std::function<void(bt_self_component_class *)>;
 using RunInCompClsInitFunc = std::function<void(bt_self_component *)>;
 using RunInMsgIterClsInitFunc = std::function<void(bt_self_message_iterator *)>;
This page took 0.064847 seconds and 4 git commands to generate.