From c802cacb9f0879a42e01575595a75bbefe7d3db9 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 29 Nov 2023 10:48:40 -0500 Subject: [PATCH] Sort includes in C++ files 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 Reviewed-on: https://review.lttng.org/c/babeltrace/+/11459 Tested-by: jenkins --- .clang-format | 30 +++++++++++++++-- src/cpp-common/bt2/clock-class.hpp | 10 +++--- src/cpp-common/bt2/clock-snapshot.hpp | 3 +- src/cpp-common/bt2/exc.hpp | 2 +- src/cpp-common/bt2/field-class.hpp | 12 ++++--- src/cpp-common/bt2/field-path.hpp | 2 ++ src/cpp-common/bt2/field.hpp | 8 +++-- src/cpp-common/bt2/integer-range-set.hpp | 5 +-- src/cpp-common/bt2/integer-range.hpp | 3 +- src/cpp-common/bt2/message.hpp | 10 +++--- src/cpp-common/bt2/trace-ir.hpp | 8 +++-- src/cpp-common/bt2/value.hpp | 10 +++--- src/cpp-common/cfg-error-reporting-throw.hpp | 1 + src/cpp-common/cfg-error-reporting.hpp | 1 + .../cfg-logging-error-reporting-throw.hpp | 1 + .../cfg-logging-error-reporting.hpp | 3 +- src/cpp-common/cfg-logging.hpp | 1 + src/cpp-common/exc.hpp | 2 +- src/cpp-common/glib-up.hpp | 3 +- src/cpp-common/log-cfg.hpp | 1 + src/cpp-common/make-unique.hpp | 2 +- src/cpp-common/uuid-view.cpp | 2 +- src/cpp-common/uuid-view.hpp | 2 +- src/cpp-common/uuid.hpp | 1 + src/cpp-common/vector.hpp | 1 + src/plugins/ctf/common/bfcr/bfcr.cpp | 26 ++++++++------- src/plugins/ctf/common/bfcr/bfcr.hpp | 4 ++- src/plugins/ctf/common/metadata/ast.hpp | 10 +++--- .../ctf/common/metadata/ctf-meta-resolve.cpp | 23 ++++++------- .../common/metadata/ctf-meta-translate.cpp | 10 +++--- .../metadata/ctf-meta-update-alignments.cpp | 10 +++--- .../ctf-meta-update-default-clock-classes.cpp | 16 +++++---- .../common/metadata/ctf-meta-update-in-ir.cpp | 11 ++++--- .../metadata/ctf-meta-update-meanings.cpp | 10 +++--- .../ctf-meta-update-stream-class-config.cpp | 10 +++--- .../ctf-meta-update-text-array-sequence.cpp | 10 +++--- .../ctf-meta-update-value-storing-indexes.cpp | 10 +++--- .../ctf/common/metadata/ctf-meta-validate.cpp | 16 +++++---- .../ctf/common/metadata/ctf-meta-visitors.hpp | 1 + ...tf-meta-warn-meaningless-header-fields.cpp | 16 +++++---- src/plugins/ctf/common/metadata/ctf-meta.hpp | 10 +++--- .../decoder-packetized-file-stream-to-buf.cpp | 23 ++++++------- src/plugins/ctf/common/metadata/decoder.cpp | 24 +++++++------- src/plugins/ctf/common/metadata/decoder.hpp | 2 +- src/plugins/ctf/common/metadata/lexer.lpp | 9 ++--- src/plugins/ctf/common/metadata/logging.hpp | 1 + src/plugins/ctf/common/metadata/objstack.cpp | 9 ++--- src/plugins/ctf/common/metadata/parser.ypp | 24 +++++++------- src/plugins/ctf/common/metadata/scanner.hpp | 2 ++ .../common/metadata/visitor-generate-ir.cpp | 33 ++++++++++--------- .../common/metadata/visitor-parent-links.cpp | 22 +++++++------ .../metadata/visitor-semantic-validator.cpp | 20 ++++++----- src/plugins/ctf/common/msg-iter/msg-iter.cpp | 22 +++++++------ src/plugins/ctf/common/msg-iter/msg-iter.hpp | 4 ++- src/plugins/ctf/common/print.hpp | 1 + src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp | 14 ++++---- src/plugins/ctf/fs-sink/fs-sink-stream.cpp | 16 +++++---- src/plugins/ctf/fs-sink/fs-sink-stream.hpp | 8 +++-- src/plugins/ctf/fs-sink/fs-sink-trace.cpp | 18 +++++----- src/plugins/ctf/fs-sink/fs-sink-trace.hpp | 8 +++-- src/plugins/ctf/fs-sink/fs-sink.cpp | 19 ++++++----- src/plugins/ctf/fs-sink/fs-sink.hpp | 8 +++-- .../ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp | 13 ++++---- .../ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp | 1 + .../fs-sink/translate-trace-ir-to-ctf-ir.cpp | 24 +++++++------- .../fs-sink/translate-trace-ir-to-ctf-ir.hpp | 5 +-- src/plugins/ctf/fs-src/data-stream-file.cpp | 28 ++++++++-------- src/plugins/ctf/fs-src/data-stream-file.hpp | 8 +++-- src/plugins/ctf/fs-src/file.cpp | 11 ++++--- src/plugins/ctf/fs-src/file.hpp | 4 ++- src/plugins/ctf/fs-src/fs.cpp | 26 ++++++++------- src/plugins/ctf/fs-src/fs.hpp | 7 ++-- src/plugins/ctf/fs-src/lttng-index.hpp | 1 + src/plugins/ctf/fs-src/metadata.cpp | 16 +++++---- src/plugins/ctf/fs-src/metadata.hpp | 6 ++-- src/plugins/ctf/fs-src/query.cpp | 25 +++++++------- src/plugins/ctf/fs-src/query.hpp | 3 +- src/plugins/ctf/lttng-live/data-stream.cpp | 16 ++++----- src/plugins/ctf/lttng-live/data-stream.hpp | 5 ++- src/plugins/ctf/lttng-live/lttng-live.cpp | 16 ++++----- src/plugins/ctf/lttng-live/lttng-live.hpp | 4 +-- .../ctf/lttng-live/lttng-viewer-abi.hpp | 1 + src/plugins/ctf/lttng-live/metadata.cpp | 18 +++++----- .../ctf/lttng-live/viewer-connection.cpp | 24 +++++++------- .../ctf/lttng-live/viewer-connection.hpp | 3 +- src/plugins/ctf/plugin.cpp | 2 +- tests/lib/conds/conds-triggers.cpp | 1 + tests/lib/conds/utils.cpp | 13 +++++--- tests/lib/test-fields-bin.cpp | 7 ++-- tests/lib/utils/run-in.cpp | 3 +- tests/lib/utils/run-in.hpp | 3 +- 91 files changed, 527 insertions(+), 371 deletions(-) diff --git a/.clang-format b/.clang-format index 300e046c..cba56253 100644 --- a/.clang-format +++ b/.clang-format @@ -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: '^$' + 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 diff --git a/src/cpp-common/bt2/clock-class.hpp b/src/cpp-common/bt2/clock-class.hpp index e3463d96..b2367645 100644 --- a/src/cpp-common/bt2/clock-class.hpp +++ b/src/cpp-common/bt2/clock-class.hpp @@ -7,18 +7,20 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_CLOCK_CLASS_HPP #define BABELTRACE_CPP_COMMON_BT2_CLOCK_CLASS_HPP -#include #include #include +#include + #include -#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 { diff --git a/src/cpp-common/bt2/clock-snapshot.hpp b/src/cpp-common/bt2/clock-snapshot.hpp index 643a229e..364400b6 100644 --- a/src/cpp-common/bt2/clock-snapshot.hpp +++ b/src/cpp-common/bt2/clock-snapshot.hpp @@ -8,10 +8,11 @@ #define BABELTRACE_CPP_COMMON_BT2_CLOCK_SNAPSHOT_HPP #include + #include -#include "internal/borrowed-obj.hpp" #include "exc.hpp" +#include "internal/borrowed-obj.hpp" namespace bt2 { diff --git a/src/cpp-common/bt2/exc.hpp b/src/cpp-common/bt2/exc.hpp index 4b57e43b..96a6b2cf 100644 --- a/src/cpp-common/bt2/exc.hpp +++ b/src/cpp-common/bt2/exc.hpp @@ -7,8 +7,8 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_EXC_HPP #define BABELTRACE_CPP_COMMON_BT2_EXC_HPP -#include #include +#include #include "cpp-common/exc.hpp" diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index 6e1c0d67..165cfde3 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -7,20 +7,22 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_FIELD_CLASS_HPP #define BABELTRACE_CPP_COMMON_BT2_FIELD_CLASS_HPP -#include #include +#include + #include #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 { diff --git a/src/cpp-common/bt2/field-path.hpp b/src/cpp-common/bt2/field-path.hpp index 0a024480..0a68927c 100644 --- a/src/cpp-common/bt2/field-path.hpp +++ b/src/cpp-common/bt2/field-path.hpp @@ -8,9 +8,11 @@ #define BABELTRACE_CPP_COMMON_BT2_FIELD_PATH_HPP #include + #include #include "common/assert.h" + #include "common-iter.hpp" #include "internal/borrowed-obj.hpp" #include "internal/shared-obj.hpp" diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp index dd17945f..5a3fdfd9 100644 --- a/src/cpp-common/bt2/field.hpp +++ b/src/cpp-common/bt2/field.hpp @@ -7,16 +7,18 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_FIELD_HPP #define BABELTRACE_CPP_COMMON_BT2_FIELD_HPP -#include #include +#include + #include #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 { diff --git a/src/cpp-common/bt2/integer-range-set.hpp b/src/cpp-common/bt2/integer-range-set.hpp index ad2baa1e..a86bcaf9 100644 --- a/src/cpp-common/bt2/integer-range-set.hpp +++ b/src/cpp-common/bt2/integer-range-set.hpp @@ -9,13 +9,14 @@ #include #include + #include #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 { diff --git a/src/cpp-common/bt2/integer-range.hpp b/src/cpp-common/bt2/integer-range.hpp index 7e238992..12570718 100644 --- a/src/cpp-common/bt2/integer-range.hpp +++ b/src/cpp-common/bt2/integer-range.hpp @@ -7,8 +7,9 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP #define BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP -#include #include +#include + #include #include "internal/borrowed-obj.hpp" diff --git a/src/cpp-common/bt2/message.hpp b/src/cpp-common/bt2/message.hpp index 8d54a8da..1603a6dd 100644 --- a/src/cpp-common/bt2/message.hpp +++ b/src/cpp-common/bt2/message.hpp @@ -7,20 +7,22 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP #define BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP -#include #include #include +#include + #include #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 { diff --git a/src/cpp-common/bt2/trace-ir.hpp b/src/cpp-common/bt2/trace-ir.hpp index 39ec0b67..b61394e7 100644 --- a/src/cpp-common/bt2/trace-ir.hpp +++ b/src/cpp-common/bt2/trace-ir.hpp @@ -7,19 +7,21 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP #define BABELTRACE_CPP_COMMON_BT2_TRACE_IR_HPP -#include #include +#include + #include -#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 { diff --git a/src/cpp-common/bt2/value.hpp b/src/cpp-common/bt2/value.hpp index 6e05cd0d..f99dbe94 100644 --- a/src/cpp-common/bt2/value.hpp +++ b/src/cpp-common/bt2/value.hpp @@ -7,21 +7,23 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_VALUE_HPP #define BABELTRACE_CPP_COMMON_BT2_VALUE_HPP -#include #include #include #include +#include + #include #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 { diff --git a/src/cpp-common/cfg-error-reporting-throw.hpp b/src/cpp-common/cfg-error-reporting-throw.hpp index 2d1400ed..55059c5a 100644 --- a/src/cpp-common/cfg-error-reporting-throw.hpp +++ b/src/cpp-common/cfg-error-reporting-throw.hpp @@ -10,6 +10,7 @@ #define BABELTRACE_CPP_COMMON_CFG_ERROR_REPORTING_THROW_HPP #include + #include "cfg-error-reporting.hpp" /* diff --git a/src/cpp-common/cfg-error-reporting.hpp b/src/cpp-common/cfg-error-reporting.hpp index 5951a865..81f94682 100644 --- a/src/cpp-common/cfg-error-reporting.hpp +++ b/src/cpp-common/cfg-error-reporting.hpp @@ -9,6 +9,7 @@ #define BABELTRACE_CPP_COMMON_CFG_ERROR_REPORTING_HPP #include + #include "cfg-logging.hpp" /* diff --git a/src/cpp-common/cfg-logging-error-reporting-throw.hpp b/src/cpp-common/cfg-logging-error-reporting-throw.hpp index 55a3f981..16de0ce7 100644 --- a/src/cpp-common/cfg-logging-error-reporting-throw.hpp +++ b/src/cpp-common/cfg-logging-error-reporting-throw.hpp @@ -10,6 +10,7 @@ #define BABELTRACE_CPP_COMMON_CFG_LOGGING_ERROR_REPORTING_THROW_HPP #include + #include "cfg-logging-error-reporting.hpp" /* diff --git a/src/cpp-common/cfg-logging-error-reporting.hpp b/src/cpp-common/cfg-logging-error-reporting.hpp index 0bd0ec0d..1cdc0793 100644 --- a/src/cpp-common/cfg-logging-error-reporting.hpp +++ b/src/cpp-common/cfg-logging-error-reporting.hpp @@ -9,8 +9,9 @@ #define BABELTRACE_CPP_COMMON_CFG_LOGGING_ERROR_REPORTING_HPP #include -#include "cfg-logging.hpp" + #include "cfg-error-reporting.hpp" +#include "cfg-logging.hpp" /* * Logs with the error level using the configuration `_log_cfg` and diff --git a/src/cpp-common/cfg-logging.hpp b/src/cpp-common/cfg-logging.hpp index aeee7622..cdd1308b 100644 --- a/src/cpp-common/cfg-logging.hpp +++ b/src/cpp-common/cfg-logging.hpp @@ -15,6 +15,7 @@ #endif #include + #include "logging/log.h" #define _BT_CLOG_OBJ_FMT_PREFIX "[%s] " diff --git a/src/cpp-common/exc.hpp b/src/cpp-common/exc.hpp index 1c2e1d66..09da6bec 100644 --- a/src/cpp-common/exc.hpp +++ b/src/cpp-common/exc.hpp @@ -8,9 +8,9 @@ #define BABELTRACE_CPP_COMMON_EXC_HPP #include -#include #include #include +#include namespace bt2_common { diff --git a/src/cpp-common/glib-up.hpp b/src/cpp-common/glib-up.hpp index e030f883..33e04a9d 100644 --- a/src/cpp-common/glib-up.hpp +++ b/src/cpp-common/glib-up.hpp @@ -7,9 +7,10 @@ #ifndef BABELTRACE_CPP_COMMON_GLIB_UP_HPP #define BABELTRACE_CPP_COMMON_GLIB_UP_HPP -#include #include +#include + namespace bt2_common { namespace internal { diff --git a/src/cpp-common/log-cfg.hpp b/src/cpp-common/log-cfg.hpp index 2ddfab07..5671b658 100644 --- a/src/cpp-common/log-cfg.hpp +++ b/src/cpp-common/log-cfg.hpp @@ -9,6 +9,7 @@ #define BABELTRACE_CPP_COMMON_LOG_CFG_HPP #include + #include "common/assert.h" namespace bt2_common { diff --git a/src/cpp-common/make-unique.hpp b/src/cpp-common/make-unique.hpp index 66dd7f7a..12e85f44 100644 --- a/src/cpp-common/make-unique.hpp +++ b/src/cpp-common/make-unique.hpp @@ -8,8 +8,8 @@ #define BABELTRACE_CPP_COMMON_MAKE_UNIQUE_HPP #include -#include #include +#include namespace bt2_common { diff --git a/src/cpp-common/uuid-view.cpp b/src/cpp-common/uuid-view.cpp index 7257277f..57392304 100644 --- a/src/cpp-common/uuid-view.cpp +++ b/src/cpp-common/uuid-view.cpp @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -#include "uuid.hpp" #include "uuid-view.hpp" +#include "uuid.hpp" namespace bt2_common { diff --git a/src/cpp-common/uuid-view.hpp b/src/cpp-common/uuid-view.hpp index 70b6e031..e39a40e0 100644 --- a/src/cpp-common/uuid-view.hpp +++ b/src/cpp-common/uuid-view.hpp @@ -7,10 +7,10 @@ #ifndef BABELTRACE_CPP_COMMON_UUID_VIEW_HPP #define BABELTRACE_CPP_COMMON_UUID_VIEW_HPP +#include #include #include #include -#include #include "common/assert.h" #include "common/uuid.h" diff --git a/src/cpp-common/uuid.hpp b/src/cpp-common/uuid.hpp index 935091fc..5f29da4a 100644 --- a/src/cpp-common/uuid.hpp +++ b/src/cpp-common/uuid.hpp @@ -14,6 +14,7 @@ #include "common/assert.h" #include "common/uuid.h" + #include "uuid-view.hpp" namespace bt2_common { diff --git a/src/cpp-common/vector.hpp b/src/cpp-common/vector.hpp index 44adc6e0..2d6b6cbe 100644 --- a/src/cpp-common/vector.hpp +++ b/src/cpp-common/vector.hpp @@ -8,6 +8,7 @@ #define SRC_CPP_COMMON_VECTOR_HPP #include + #include "common/assert.h" namespace bt2_common { diff --git a/src/plugins/ctf/common/bfcr/bfcr.cpp b/src/plugins/ctf/common/bfcr/bfcr.cpp index 7014f102..ae139d75 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.cpp +++ b/src/plugins/ctf/common/bfcr/bfcr.cpp @@ -7,27 +7,29 @@ * Babeltrace - CTF binary field class reader (BFCR) */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include -#include +#include "common/align.h" #include "common/assert.h" -#include -#include "compat/bitfield.h" #include "common/common.h" -#include -#include "common/align.h" -#include +#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) diff --git a/src/plugins/ctf/common/bfcr/bfcr.hpp b/src/plugins/ctf/common/bfcr/bfcr.hpp index d7af2e7e..fc745b8b 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.hpp +++ b/src/plugins/ctf/common/bfcr/bfcr.hpp @@ -10,10 +10,12 @@ #ifndef CTF_BFCR_H #define CTF_BFCR_H -#include #include +#include #include + #include + #include "common/macros.h" #include "../metadata/ctf-meta.hpp" diff --git a/src/plugins/ctf/common/metadata/ast.hpp b/src/plugins/ctf/common/metadata/ast.hpp index a7f36338..ad14a5af 100644 --- a/src/plugins/ctf/common/metadata/ast.hpp +++ b/src/plugins/ctf/common/metadata/ast.hpp @@ -7,16 +7,18 @@ #ifndef _CTF_AST_H #define _CTF_AST_H +#include #include #include -#include -#include "common/list.h" + #include -#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 diff --git a/src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp b/src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp index 423202a9..f498c507 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp @@ -5,27 +5,28 @@ * Copyright 2015 Jérémie Galarneau */ +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include "common/macros.h" #include "common/assert.h" #include "common/common.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "common/macros.h" #include "ctf-meta-visitors.hpp" -#include "logging.hpp" using field_class_stack_t = GPtrArray; diff --git a/src/plugins/ctf/common/metadata/ctf-meta-translate.cpp b/src/plugins/ctf/common/metadata/ctf-meta-translate.cpp index 9082690a..21df1c2c 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-translate.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-translate.cpp @@ -4,14 +4,16 @@ * Copyright 2018 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-alignments.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-alignments.cpp index 21360d9d..5927e92f 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-alignments.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-alignments.cpp @@ -4,13 +4,15 @@ * Copyright 2020 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.cpp index a59d854e..106d6628 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.cpp @@ -4,22 +4,24 @@ * Copyright 2018 Philippe Proulx */ +#include +#include +#include +#include + +#include + #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 -#include "common/macros.h" #include "common/assert.h" -#include -#include -#include -#include +#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, diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.cpp index 4a4ea8fa..3ac51745 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.cpp @@ -4,16 +4,17 @@ * Copyright 2018 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" -#include "compat/glib.h" #include +#include #include #include #include -#include + +#include + #include "common/assert.h" +#include "common/macros.h" +#include "compat/glib.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.cpp index c032f085..6f4138af 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.cpp @@ -4,13 +4,15 @@ * Copyright 2018 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.cpp index 40cd1bbd..9dec05f2 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.cpp @@ -4,13 +4,15 @@ * Copyright 2019 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.cpp index 8f6280e1..2e59529f 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.cpp @@ -4,13 +4,15 @@ * Copyright 2018 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.cpp b/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.cpp index 274cdcc9..a51b03cf 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.cpp @@ -4,13 +4,15 @@ * Copyright 2018 Philippe Proulx */ -#include -#include "common/macros.h" -#include "common/assert.h" #include +#include #include #include -#include + +#include + +#include "common/assert.h" +#include "common/macros.h" #include "ctf-meta-visitors.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-validate.cpp b/src/plugins/ctf/common/metadata/ctf-meta-validate.cpp index 29f5471a..c11a0b94 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-validate.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-validate.cpp @@ -4,22 +4,24 @@ * Copyright 2018 Philippe Proulx */ +#include +#include +#include +#include + +#include + #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 -#include "common/macros.h" #include "common/assert.h" -#include -#include -#include -#include +#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) { diff --git a/src/plugins/ctf/common/metadata/ctf-meta-visitors.hpp b/src/plugins/ctf/common/metadata/ctf-meta-visitors.hpp index 91dd62fa..9dd30301 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-visitors.hpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-visitors.hpp @@ -8,6 +8,7 @@ #define _CTF_META_VISITORS_H #include + #include "common/macros.h" #include "ctf-meta.hpp" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.cpp b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.cpp index 0e6f776b..6b31f88e 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.cpp +++ b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.cpp @@ -4,21 +4,23 @@ * Copyright 2018 Philippe Proulx */ +#include +#include +#include +#include + +#include + #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 -#include "common/macros.h" #include "common/assert.h" -#include -#include -#include -#include +#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) diff --git a/src/plugins/ctf/common/metadata/ctf-meta.hpp b/src/plugins/ctf/common/metadata/ctf-meta.hpp index 24dc01a5..b2d1c552 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta.hpp +++ b/src/plugins/ctf/common/metadata/ctf-meta.hpp @@ -7,15 +7,17 @@ #ifndef _CTF_META_H #define _CTF_META_H -#include -#include "common/common.h" -#include "common/uuid.h" -#include "common/assert.h" #include #include #include #include +#include + +#include "common/assert.h" +#include "common/common.h" +#include "common/uuid.h" + enum ctf_field_class_type { CTF_FIELD_CLASS_TYPE_INT, diff --git a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.cpp b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.cpp index 4cc964ae..c89ee8b1 100644 --- a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.cpp +++ b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.cpp @@ -4,30 +4,31 @@ * Copyright 2016-2017 Philippe Proulx */ +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include #include "common/assert.h" #include "common/uuid.h" #include "compat/memstream.h" -#include -#include -#include #include "ast.hpp" +#include "decoder-packetized-file-stream-to-buf.hpp" #include "decoder.hpp" #include "scanner.hpp" -#include "logging.hpp" #define TSDL_MAGIC 0x75d11d57 diff --git a/src/plugins/ctf/common/metadata/decoder.cpp b/src/plugins/ctf/common/metadata/decoder.cpp index d1f1c2de..cd61678f 100644 --- a/src/plugins/ctf/common/metadata/decoder.cpp +++ b/src/plugins/ctf/common/metadata/decoder.cpp @@ -4,30 +4,32 @@ * Copyright 2016-2017 Philippe Proulx */ +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include #include "common/assert.h" #include "common/uuid.h" #include "compat/memstream.h" -#include -#include -#include #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 diff --git a/src/plugins/ctf/common/metadata/decoder.hpp b/src/plugins/ctf/common/metadata/decoder.hpp index 33caebef..7c5bdffb 100644 --- a/src/plugins/ctf/common/metadata/decoder.hpp +++ b/src/plugins/ctf/common/metadata/decoder.hpp @@ -7,8 +7,8 @@ #ifndef _METADATA_DECODER_H #define _METADATA_DECODER_H -#include #include +#include #include #include diff --git a/src/plugins/ctf/common/metadata/lexer.lpp b/src/plugins/ctf/common/metadata/lexer.lpp index 2ee0f2db..7c2d5d38 100644 --- a/src/plugins/ctf/common/metadata/lexer.lpp +++ b/src/plugins/ctf/common/metadata/lexer.lpp @@ -7,15 +7,16 @@ * Common Trace Formal Lexer */ +#include +#include + #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 -#include -#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) diff --git a/src/plugins/ctf/common/metadata/logging.hpp b/src/plugins/ctf/common/metadata/logging.hpp index a62f1e1e..d2cb03f6 100644 --- a/src/plugins/ctf/common/metadata/logging.hpp +++ b/src/plugins/ctf/common/metadata/logging.hpp @@ -8,6 +8,7 @@ #define CTF_METADATA_LOGGING_H #include + #include "logging/log.h" /* diff --git a/src/plugins/ctf/common/metadata/objstack.cpp b/src/plugins/ctf/common/metadata/objstack.cpp index 1d808384..2eb93838 100644 --- a/src/plugins/ctf/common/metadata/objstack.cpp +++ b/src/plugins/ctf/common/metadata/objstack.cpp @@ -6,16 +6,17 @@ * Common Trace Format Object Stack. */ +#include + #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 +#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 diff --git a/src/plugins/ctf/common/metadata/parser.ypp b/src/plugins/ctf/common/metadata/parser.ypp index 82dd8ccd..eb6e32c7 100644 --- a/src/plugins/ctf/common/metadata/parser.ypp +++ b/src/plugins/ctf/common/metadata/parser.ypp @@ -7,25 +7,25 @@ * Common Trace Format Metadata Grammar. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include -#include -#include -#include -#include #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 { diff --git a/src/plugins/ctf/common/metadata/scanner.hpp b/src/plugins/ctf/common/metadata/scanner.hpp index 8869f21c..15e8e4ae 100644 --- a/src/plugins/ctf/common/metadata/scanner.hpp +++ b/src/plugins/ctf/common/metadata/scanner.hpp @@ -8,7 +8,9 @@ #define _CTF_SCANNER_H #include + #include "common/macros.h" + #include "ast.hpp" #ifndef YY_TYPEDEF_YY_SCANNER_T diff --git a/src/plugins/ctf/common/metadata/visitor-generate-ir.cpp b/src/plugins/ctf/common/metadata/visitor-generate-ir.cpp index 80b1b36d..e9483a99 100644 --- a/src/plugins/ctf/common/metadata/visitor-generate-ir.cpp +++ b/src/plugins/ctf/common/metadata/visitor-generate-ir.cpp @@ -7,34 +7,37 @@ * Common Trace Format metadata visitor (generates CTF IR objects). */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include -#include #include "common/assert.h" -#include -#include -#include -#include #include "common/common.h" #include "common/uuid.h" #include "compat/endian.h" -#include -#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)) diff --git a/src/plugins/ctf/common/metadata/visitor-parent-links.cpp b/src/plugins/ctf/common/metadata/visitor-parent-links.cpp index 724ada65..3c0f095d 100644 --- a/src/plugins/ctf/common/metadata/visitor-parent-links.cpp +++ b/src/plugins/ctf/common/metadata/visitor-parent-links.cpp @@ -6,24 +6,26 @@ * Common Trace Format Metadata Parent Link Creator. */ +#include +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include #include "common/assert.h" -#include -#include -#include -#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) diff --git a/src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp b/src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp index c46e8283..93631fa4 100644 --- a/src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp +++ b/src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp @@ -6,23 +6,25 @@ * Common Trace Format Metadata Semantic Validator. */ +#include +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include #include "common/assert.h" -#include -#include -#include #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) diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.cpp b/src/plugins/ctf/common/msg-iter/msg-iter.cpp index 5f38ec6c..38305c84 100644 --- a/src/plugins/ctf/common/msg-iter/msg-iter.cpp +++ b/src/plugins/ctf/common/msg-iter/msg-iter.cpp @@ -7,25 +7,27 @@ * Babeltrace - CTF message iterator */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include #include "common/assert.h" -#include -#include #include "common/common.h" -#include -#include -#include "msg-iter.hpp" #include "../bfcr/bfcr.hpp" +#include "msg-iter.hpp" struct ctf_msg_iter; diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.hpp b/src/plugins/ctf/common/msg-iter/msg-iter.hpp index 15a952d2..830f96c7 100644 --- a/src/plugins/ctf/common/msg-iter/msg-iter.hpp +++ b/src/plugins/ctf/common/msg-iter/msg-iter.hpp @@ -11,10 +11,12 @@ #define CTF_MSG_ITER_H #include +#include #include #include -#include + #include + #include "common/macros.h" #include "../metadata/ctf-meta.hpp" diff --git a/src/plugins/ctf/common/print.hpp b/src/plugins/ctf/common/print.hpp index 90c8d409..4e89da7b 100644 --- a/src/plugins/ctf/common/print.hpp +++ b/src/plugins/ctf/common/print.hpp @@ -10,6 +10,7 @@ #define CTF_BTR_PRINT_H #include + #include "common/macros.h" #define PERR(fmt, ...) \ diff --git a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp index 8795b451..4cf009c1 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp +++ b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.hpp @@ -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 -#include "common/common.h" -#include "common/assert.h" -#include "common/uuid.h" +#include #include +#include #include #include -#include -#include + +#include + +#include "common/assert.h" +#include "common/common.h" +#include "common/uuid.h" enum fs_sink_ctf_field_class_type { diff --git a/src/plugins/ctf/fs-sink/fs-sink-stream.cpp b/src/plugins/ctf/fs-sink/fs-sink-stream.cpp index e1487883..a72e71b9 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-stream.cpp +++ b/src/plugins/ctf/fs-sink/fs-sink-stream.cpp @@ -4,22 +4,24 @@ * Copyright 2019 Philippe Proulx */ +#include +#include +#include + +#include + #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 -#include -#include -#include #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) diff --git a/src/plugins/ctf/fs-sink/fs-sink-stream.hpp b/src/plugins/ctf/fs-sink/fs-sink-stream.hpp index cb95c08f..16f93187 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-stream.hpp +++ b/src/plugins/ctf/fs-sink/fs-sink-stream.hpp @@ -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 -#include "ctfser/ctfser.h" #include #include #include +#include + +#include "common/macros.h" +#include "ctfser/ctfser.h" + #include "fs-sink-ctf-meta.hpp" struct fs_sink_trace; diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.cpp b/src/plugins/ctf/fs-sink/fs-sink-trace.cpp index 1fad4a48..0e2fceec 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-trace.cpp +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.cpp @@ -4,23 +4,25 @@ * Copyright 2019 Philippe Proulx */ +#include +#include +#include + +#include + #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 -#include -#include -#include #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: diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.hpp b/src/plugins/ctf/fs-sink/fs-sink-trace.hpp index 0f2bdb4c..5ddb678d 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-trace.hpp +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.hpp @@ -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 -#include "ctfser/ctfser.h" #include #include +#include + +#include "common/macros.h" +#include "ctfser/ctfser.h" + #include "fs-sink-ctf-meta.hpp" struct fs_sink_comp; diff --git a/src/plugins/ctf/fs-sink/fs-sink.cpp b/src/plugins/ctf/fs-sink/fs-sink.cpp index e99f130d..d7109e0f 100644 --- a/src/plugins/ctf/fs-sink/fs-sink.cpp +++ b/src/plugins/ctf/fs-sink/fs-sink.cpp @@ -4,25 +4,28 @@ * Copyright 2019 Philippe Proulx */ +#include +#include +#include + +#include + #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 -#include -#include -#include #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"; diff --git a/src/plugins/ctf/fs-sink/fs-sink.hpp b/src/plugins/ctf/fs-sink/fs-sink.hpp index d853ccb6..355c4f45 100644 --- a/src/plugins/ctf/fs-sink/fs-sink.hpp +++ b/src/plugins/ctf/fs-sink/fs-sink.hpp @@ -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 -#include #include +#include + +#include + +#include "common/macros.h" struct fs_sink_comp { diff --git a/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp index b3bbfbe1..d3e5083f 100644 --- a/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp +++ b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp @@ -4,18 +4,19 @@ * Copyright 2019 Philippe Proulx */ -#include "translate-ctf-ir-to-tsdl.hpp" - -#include -#include "common/macros.h" -#include +#include #include +#include #include -#include + +#include + #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 { diff --git a/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp index b9ddec72..1cdefc81 100644 --- a/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp +++ b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.hpp @@ -10,6 +10,7 @@ #include #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); diff --git a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp index 80adcc3a..88bff0bf 100644 --- a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp +++ b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp @@ -4,25 +4,27 @@ * Copyright 2019 Philippe Proulx */ +#include + +#include +#include +#include +#include + +#include + #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 -#include "common/macros.h" -#include "common/common.h" #include "common/assert.h" -#include -#include -#include -#include -#include +#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 { diff --git a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp index c56d3abe..736a160a 100644 --- a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp +++ b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.hpp @@ -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 -#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, diff --git a/src/plugins/ctf/fs-src/data-stream-file.cpp b/src/plugins/ctf/fs-src/data-stream-file.cpp index 482383b1..d4898442 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.cpp +++ b/src/plugins/ctf/fs-src/data-stream-file.cpp @@ -6,27 +6,29 @@ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation */ +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include -#include -#include "compat/mman.h" -#include "compat/endian.h" -#include +#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 +#include "file.hpp" +#include "metadata.hpp" static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file) { diff --git a/src/plugins/ctf/fs-src/data-stream-file.hpp b/src/plugins/ctf/fs-src/data-stream-file.hpp index a163f1dc..833fde25 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.hpp +++ b/src/plugins/ctf/fs-src/data-stream-file.hpp @@ -7,12 +7,14 @@ #ifndef CTF_FS_DS_FILE_H #define CTF_FS_DS_FILE_H -#include -#include #include -#include "common/macros.h" +#include +#include + #include +#include "common/macros.h" + #include "../common/msg-iter/msg-iter.hpp" #include "lttng-index.hpp" diff --git a/src/plugins/ctf/fs-src/file.cpp b/src/plugins/ctf/fs-src/file.cpp index 45bdd301..947e09dd 100644 --- a/src/plugins/ctf/fs-src/file.cpp +++ b/src/plugins/ctf/fs-src/file.cpp @@ -4,16 +4,17 @@ * Copyright 2016 Philippe Proulx */ +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include #include "file.hpp" void ctf_fs_file_destroy(struct ctf_fs_file *file) diff --git a/src/plugins/ctf/fs-src/file.hpp b/src/plugins/ctf/fs-src/file.hpp index 79242e75..c3b524a3 100644 --- a/src/plugins/ctf/fs-src/file.hpp +++ b/src/plugins/ctf/fs-src/file.hpp @@ -7,9 +7,11 @@ #ifndef CTF_FS_FILE_H #define CTF_FS_FILE_H -#include #include +#include + #include "common/macros.h" + #include "fs.hpp" void ctf_fs_file_destroy(struct ctf_fs_file *file); diff --git a/src/plugins/ctf/fs-src/fs.cpp b/src/plugins/ctf/fs-src/fs.cpp index aa49faeb..ed808d31 100644 --- a/src/plugins/ctf/fs-src/fs.cpp +++ b/src/plugins/ctf/fs-src/fs.cpp @@ -7,27 +7,31 @@ * Babeltrace CTF file system Reader Component */ +#include +#include +#include + +#include + #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 #include "common/uuid.h" -#include -#include "common/assert.h" -#include -#include -#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 { diff --git a/src/plugins/ctf/fs-src/fs.hpp b/src/plugins/ctf/fs-src/fs.hpp index 0efb2039..0ad22532 100644 --- a/src/plugins/ctf/fs-src/fs.hpp +++ b/src/plugins/ctf/fs-src/fs.hpp @@ -11,11 +11,14 @@ #define BABELTRACE_PLUGIN_CTF_FS_H #include -#include "common/macros.h" + #include + +#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; diff --git a/src/plugins/ctf/fs-src/lttng-index.hpp b/src/plugins/ctf/fs-src/lttng-index.hpp index 644f57de..46f4a4d1 100644 --- a/src/plugins/ctf/fs-src/lttng-index.hpp +++ b/src/plugins/ctf/fs-src/lttng-index.hpp @@ -10,6 +10,7 @@ #define LTTNG_INDEX_H #include + #include "compat/limits.h" #define CTF_INDEX_MAGIC 0xC1F1DCC1 diff --git a/src/plugins/ctf/fs-src/metadata.cpp b/src/plugins/ctf/fs-src/metadata.cpp index 5e6f7d10..562ef981 100644 --- a/src/plugins/ctf/fs-src/metadata.cpp +++ b/src/plugins/ctf/fs-src/metadata.cpp @@ -5,24 +5,26 @@ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation */ +#include +#include +#include +#include + +#include + #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 -#include -#include #include "common/assert.h" -#include #include "common/uuid.h" #include "compat/memstream.h" -#include -#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) diff --git a/src/plugins/ctf/fs-src/metadata.hpp b/src/plugins/ctf/fs-src/metadata.hpp index e0298393..d8fde107 100644 --- a/src/plugins/ctf/fs-src/metadata.hpp +++ b/src/plugins/ctf/fs-src/metadata.hpp @@ -7,12 +7,14 @@ #ifndef CTF_FS_METADATA_H #define CTF_FS_METADATA_H +#include #include #include -#include -#include "common/macros.h" + #include +#include "common/macros.h" + #define CTF_FS_METADATA_FILENAME "metadata" struct ctf_fs_trace; diff --git a/src/plugins/ctf/fs-src/query.cpp b/src/plugins/ctf/fs-src/query.cpp index 2c758c25..3e9c2a67 100644 --- a/src/plugins/ctf/fs-src/query.cpp +++ b/src/plugins/ctf/fs-src/query.cpp @@ -6,25 +6,28 @@ * Babeltrace CTF file system Reader Component queries */ +#include +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include -#include #include "common/assert.h" -#include "metadata.hpp" -#include "../common/metadata/decoder.hpp" #include "common/common.h" #include "common/macros.h" -#include + +#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" diff --git a/src/plugins/ctf/fs-src/query.hpp b/src/plugins/ctf/fs-src/query.hpp index cadf83db..3b17fb8a 100644 --- a/src/plugins/ctf/fs-src/query.hpp +++ b/src/plugins/ctf/fs-src/query.hpp @@ -9,9 +9,10 @@ #ifndef BABELTRACE_PLUGIN_CTF_FS_QUERY_H #define BABELTRACE_PLUGIN_CTF_FS_QUERY_H -#include "common/macros.h" #include +#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); diff --git a/src/plugins/ctf/lttng-live/data-stream.cpp b/src/plugins/ctf/lttng-live/data-stream.cpp index a9502156..5ab21297 100644 --- a/src/plugins/ctf/lttng-live/data-stream.cpp +++ b/src/plugins/ctf/lttng-live/data-stream.cpp @@ -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 #include #include #include -#include - #include -#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-" diff --git a/src/plugins/ctf/lttng-live/data-stream.hpp b/src/plugins/ctf/lttng-live/data-stream.hpp index c16eae87..28b3b95f 100644 --- a/src/plugins/ctf/lttng-live/data-stream.hpp +++ b/src/plugins/ctf/lttng-live/data-stream.hpp @@ -7,10 +7,9 @@ #ifndef LTTNG_LIVE_DATA_STREAM_H #define LTTNG_LIVE_DATA_STREAM_H -#include -#include - #include +#include +#include #include "../common/msg-iter/msg-iter.hpp" #include "lttng-live.hpp" diff --git a/src/plugins/ctf/lttng-live/lttng-live.cpp b/src/plugins/ctf/lttng-live/lttng-live.cpp index 826a1b53..5f33ab22 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.cpp +++ b/src/plugins/ctf/lttng-live/lttng-live.cpp @@ -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 #include #include #include -#include +#include + +#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 #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" diff --git a/src/plugins/ctf/lttng-live/lttng-live.hpp b/src/plugins/ctf/lttng-live/lttng-live.hpp index 5e2e3686..945db0f6 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.hpp +++ b/src/plugins/ctf/lttng-live/lttng-live.hpp @@ -11,14 +11,14 @@ #ifndef BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H #define BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H +#include #include #include -#include - #include #include "common/macros.h" + #include "../common/metadata/decoder.hpp" #include "../common/msg-iter/msg-iter.hpp" #include "viewer-connection.hpp" diff --git a/src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp b/src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp index 0d1911ad..f8ae6a21 100644 --- a/src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp +++ b/src/plugins/ctf/lttng-live/lttng-viewer-abi.hpp @@ -10,6 +10,7 @@ #define LTTNG_VIEWER_ABI_H #include + #include "compat/limits.h" #define LTTNG_VIEWER_PATH_MAX 4096 diff --git a/src/plugins/ctf/lttng-live/metadata.cpp b/src/plugins/ctf/lttng-live/metadata.cpp index e83e4b6f..7a44b2d0 100644 --- a/src/plugins/ctf/lttng-live/metadata.cpp +++ b/src/plugins/ctf/lttng-live/metadata.cpp @@ -6,22 +6,24 @@ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation */ +#include +#include +#include +#include +#include + +#include + #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 -#include -#include -#include -#include #include "compat/memstream.h" -#include -#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 diff --git a/src/plugins/ctf/lttng-live/viewer-connection.cpp b/src/plugins/ctf/lttng-live/viewer-connection.cpp index 805501fb..eb4bd129 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.cpp +++ b/src/plugins/ctf/lttng-live/viewer-connection.cpp @@ -5,12 +5,8 @@ * Copyright 2016 Mathieu Desnoyers */ -#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 +#include #include #include #include @@ -18,19 +14,23 @@ #include #include -#include +#include + +#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 +#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 { \ diff --git a/src/plugins/ctf/lttng-live/viewer-connection.hpp b/src/plugins/ctf/lttng-live/viewer-connection.hpp index 2943e109..1ad239e4 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.hpp +++ b/src/plugins/ctf/lttng-live/viewer-connection.hpp @@ -7,12 +7,11 @@ #ifndef LTTNG_LIVE_VIEWER_CONNECTION_H #define LTTNG_LIVE_VIEWER_CONNECTION_H +#include #include #include #include -#include - #include #include "common/macros.h" diff --git a/src/plugins/ctf/plugin.cpp b/src/plugins/ctf/plugin.cpp index 835d16c3..e5126619 100644 --- a/src/plugins/ctf/plugin.cpp +++ b/src/plugins/ctf/plugin.cpp @@ -8,8 +8,8 @@ #include -#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 diff --git a/tests/lib/conds/conds-triggers.cpp b/tests/lib/conds/conds-triggers.cpp index c348c556..83182f9a 100644 --- a/tests/lib/conds/conds-triggers.cpp +++ b/tests/lib/conds/conds-triggers.cpp @@ -7,6 +7,7 @@ #include #include "common/assert.h" + #include "utils.hpp" static void trigger_graph_mip_version(void) diff --git a/tests/lib/conds/utils.cpp b/tests/lib/conds/utils.cpp index 7ee486be..53984752 100644 --- a/tests/lib/conds/utils.cpp +++ b/tests/lib/conds/utils.cpp @@ -4,18 +4,21 @@ * Copyright (C) 2020 Philippe Proulx */ -#include +#include + +#include +#include #include +#include #include -#include + #include -#include -#include #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) { diff --git a/tests/lib/test-fields-bin.cpp b/tests/lib/test-fields-bin.cpp index 9899f86e..0bc8bb3b 100644 --- a/tests/lib/test-fields-bin.cpp +++ b/tests/lib/test-fields-bin.cpp @@ -4,10 +4,13 @@ * Copyright (C) 2023 EfficiOS Inc. */ +#include + +#include "common/assert.h" + #include "utils/run-in.hpp" + #include "tap/tap.h" -#include "common/assert.h" -#include static const int NR_TESTS = 2; diff --git a/tests/lib/utils/run-in.cpp b/tests/lib/utils/run-in.cpp index c57c8c09..01913872 100644 --- a/tests/lib/utils/run-in.cpp +++ b/tests/lib/utils/run-in.cpp @@ -6,9 +6,10 @@ #include -#include "run-in.hpp" #include "common/assert.h" +#include "run-in.hpp" + namespace { struct RunInData final diff --git a/tests/lib/utils/run-in.hpp b/tests/lib/utils/run-in.hpp index 2220b977..0855e05e 100644 --- a/tests/lib/utils/run-in.hpp +++ b/tests/lib/utils/run-in.hpp @@ -7,9 +7,10 @@ #ifndef TESTS_LIB_UTILS_H #define TESTS_LIB_UTILS_H -#include #include +#include + using RunInCompClsQueryFunc = std::function; using RunInCompClsInitFunc = std::function; using RunInMsgIterClsInitFunc = std::function; -- 2.34.1