Remove some unused includes in C++ files
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 7 Dec 2023 21:54:24 +0000 (21:54 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Dec 2023 15:57:04 +0000 (10:57 -0500)
Remove some unused include files.  This was done partly looking at
"unused-includes" warnings from clangd in my IDE, and partly with
include-what-you-use.

Whenever needed, add some includes to keep things compiling (where
some header files relied on previous inclusions).

Change-Id: I0bca7aba4c172a13474a76b08e4a0b543e152733
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11493
Tested-by: jenkins <jenkins@lttng.org>
71 files changed:
src/common/uuid.h
src/cpp-common/bt2/common-iter.hpp
src/cpp-common/bt2/exc.hpp
src/cpp-common/bt2/internal/utils.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/read-fixed-len-int.hpp
src/cpp-common/uuid-view.hpp
src/cpp-common/uuid.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-configure-ir-trace.cpp
src/plugins/ctf/common/metadata/ctf-meta-configure-ir-trace.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/decoder-packetized-file-stream-to-buf.cpp
src/plugins/ctf/common/metadata/decoder.hpp
src/plugins/ctf/common/metadata/logging.hpp
src/plugins/ctf/common/metadata/objstack.cpp
src/plugins/ctf/common/metadata/objstack.hpp
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/metadata.hpp
src/plugins/ctf/lttng-live/viewer-connection.cpp
src/plugins/ctf/lttng-live/viewer-connection.hpp
tests/lib/conds/utils.cpp

index dfe3a7ee8f6ff7e270c5ca8516802e3cc7c3c86d..c8418a67e6273037f4ac13aa8aa048a922531e7e 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _BABELTRACE_COMMON_UUID_H
 #define _BABELTRACE_COMMON_UUID_H
 
+#include <inttypes.h>
 #include <stdint.h>
 #include "common/macros.h"
 
index 5ebade34859c167b26ea6b64b1dd4418cad90eac..553282f871219fb4a77ac4d5d0a93d1dd36a4803 100644 (file)
@@ -8,7 +8,6 @@
 #define BABELTRACE_CPP_COMMON_BT2_COMMON_ITER_HPP
 
 #include <iterator>
-#include <type_traits>
 
 #include "cpp-common/optional.hpp"
 
index 96a6b2cf2a2549cf6a2ea0b8ea8658692d07077a..3b16a22b9082aa8fdec449cbdf208f2244d45b5e 100644 (file)
@@ -7,9 +7,6 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_EXC_HPP
 #define BABELTRACE_CPP_COMMON_BT2_EXC_HPP
 
-#include <stdexcept>
-#include <string>
-
 #include "cpp-common/exc.hpp"
 
 namespace bt2 {
index 7b162d12c28a268eb6a88df43008b9a3528518e1..3c655b885407ab38511c3ddd025794d577233781 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
 #define BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
 
-#include <type_traits>
-
 #include "../exc.hpp"
 
 namespace bt2 {
index 1603a6dd7a8bb37aaac4fdf9de30513beff422ce..36ea68a3e74dde7d3ec51536c48dd49e14a8a686 100644 (file)
@@ -8,18 +8,14 @@
 #define BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP
 
 #include <cstdint>
-#include <functional>
 #include <type_traits>
 
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "common/common.h"
 #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"
index b61394e71d8ff8d641c3aafc9083c5a5ffe68bbe..f27a87aee01e7b11ddc1bafd1d4c4b6090c38e2b 100644 (file)
@@ -16,7 +16,6 @@
 #include "cpp-common/string_view.hpp"
 
 #include "clock-class.hpp"
-#include "clock-snapshot.hpp"
 #include "field-class.hpp"
 #include "field.hpp"
 #include "internal/borrowed-obj.hpp"
index f99dbe94975b2ce57a855c814317bce1f90a329c..0dfe9dc614d42b8598b80365089700a3958d2ddf 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <cstdint>
 #include <functional>
-#include <iterator>
 #include <type_traits>
 
 #include <babeltrace2/babeltrace.h>
index 55059c5a2b9ffdb341d8ee675498c5f5072f744f..6d39877cbdcc848f5be26bd15c9225214dcc2aa2 100644 (file)
@@ -33,9 +33,8 @@
 #define BT_APPEND_CAUSE_AND_RETHROW_EX(_log_cfg, _fmt, ...)                                        \
     do {                                                                                           \
         BT_APPEND_CAUSE_EX((_log_cfg), _fmt, ##__VA_ARGS__);                                       \
-        throw;
-}
-while (false)
+        throw;                                                                                     \
+    } while (false)
 
 #define BT_APPEND_CAUSE_AND_RETHROW(_fmt, ...)                                                     \
     BT_APPEND_CAUSE_AND_RETHROW_EX((BT_CLOG_CFG), _fmt, ##__VA_ARGS__)
index 81f946825af707f6616ec74a8c5aa420baded97b..49a2081e36904b6bf4eec3566b9a618589c1b447 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "cfg-logging.hpp"
-
 /*
  * Appends a cause to the error of the current thread using the logging
  * configuration `_log_cfg`.
index c0654f8b621d25ec932c3d8d4aeffef3c8450891..07481f218fbd553219a4b797b41fdf3bddbb8d4b 100644 (file)
@@ -8,7 +8,6 @@
 #define BABELTRACE_CPP_COMMON_READ_FIXED_LEN_INT_HPP
 
 #include <cstdint>
-#include <cstdlib>
 #include <cstring>
 #include <type_traits>
 
index e39a40e085ae1f00b67c4e9a457c0051628a4a18..d719d877a3b87b306cd226845aa2e7d02a8485e8 100644 (file)
@@ -8,7 +8,6 @@
 #define BABELTRACE_CPP_COMMON_UUID_VIEW_HPP
 
 #include <algorithm>
-#include <array>
 #include <cstdint>
 #include <string>
 
index 5f29da4a1c5c54b4102f288480be0d111b880292..13c3cb918738337e4e6c5bbdfabcb18727957cc2 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <algorithm>
 #include <array>
-#include <cstdint>
 #include <string>
 
 #include "common/assert.h"
index 89560e8614ea9e1a6ec9342c54ec3de05cfb11a0..f59f65d0f2f076041982281a1fbd062a2351bcfc 100644 (file)
@@ -11,8 +11,6 @@
 #include <inttypes.h>
 #include <stddef.h>
 #include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include <babeltrace2/babeltrace.h>
@@ -56,8 +54,6 @@ struct stack_entry
     int64_t index;
 };
 
-struct bt_bfcr;
-
 /* Visit stack */
 struct stack
 {
index fc745b8b0197bce2f7b5705c10641c7afc0dc173..8a7864e3478afa03322e95383697ccaf18b659b0 100644 (file)
 
 #include <stddef.h>
 #include <stdint.h>
-#include <stdio.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
-#include "../metadata/ctf-meta.hpp"
-
 /**
  * @file bfcr.h
  *
@@ -64,9 +59,6 @@ enum bt_bfcr_status
     BT_BFCR_STATUS_OK = 0,
 };
 
-/** Field class reader. */
-struct bt_bfcr;
-
 typedef enum bt_bfcr_status (*bt_bfcr_unsigned_int_cb_func)(uint64_t, struct ctf_field_class *,
                                                             void *);
 
index ad14a5af3d3b5c9e78d8661be6cee68589d5c461..a6a7e9f7b947db6c4e447ca9769dfcf7702d7aef 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "common/assert.h"
 #include "common/list.h"
-#include "common/macros.h"
 
 #include "ctf-meta.hpp"
 #include "decoder.hpp"
index fc89c6ceb46bb6f3ed67606a4bbdb0150d4335b7..ef178c53beb9a4f447b4f882dd6c37c2d230bdec 100644 (file)
@@ -6,7 +6,10 @@
 
 #include <babeltrace2/babeltrace.h>
 
+#include "common/assert.h"
+
 #include "ctf-meta-configure-ir-trace.hpp"
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
 
 int ctf_trace_class_configure_ir_trace(struct ctf_trace_class *tc, bt_trace *ir_trace)
 {
index 23f8d2605899918aa7e76fca9feddb7f8703a62d..0f9c8795f5a4bd8e064b7f820270bd83d7f4fca3 100644 (file)
@@ -7,10 +7,6 @@
 #ifndef _CTF_META_CONFIGURE_IR_TRACE_H
 #define _CTF_META_CONFIGURE_IR_TRACE_H
 
-#include "common/macros.h"
-
-#include "ctf-meta.hpp"
-
 int ctf_trace_class_configure_ir_trace(struct ctf_trace_class *tc, bt_trace *ir_trace);
 
 #endif /* _CTF_META_CONFIGURE_IR_TRACE_H */
index 293ee4a553c4042d081d0c0bf88caba8a361ee98..b238b6fb0e4bb4775ca2d76ad6244b78a1cec26b 100644 (file)
@@ -7,8 +7,6 @@
 
 #include <glib.h>
 #include <inttypes.h>
-#include <limits.h>
-#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -23,7 +21,6 @@
 
 #include "common/assert.h"
 #include "common/common.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index f86b979b148a7f396de4f0c3ce0f9b99940c7557..e3ecfd077f562816ab8881bdda738e3e5611b2c8 100644 (file)
@@ -4,15 +4,12 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 5927e92fd2af6140d0171029dd8b3bbe2a84550e..bea62bf997811babd6cf585482b4f8b3269c2a0c 100644 (file)
@@ -4,15 +4,7 @@
  * Copyright 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
-#include <string.h>
-
-#include <babeltrace2/babeltrace.h>
-
-#include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 106d6628f4ca183890227d76c675efa1832de201..ab10dd4fa173a31a8d8571c0da3edd0743bff692 100644 (file)
@@ -4,22 +4,14 @@
  * 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 "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 1c49e8a729df1d1cb3af28943185a245f28ac6c9..c7902383f805115d7913d99dec86d721b671b9ee 100644 (file)
@@ -4,15 +4,11 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <assert.h>
 #include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
-#include <string.h>
-
-#include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "common/macros.h"
 #include "compat/glib.h"
 
 #include "ctf-meta-visitors.hpp"
index 6f4138afba522d8e061e365d95cf48f7f1ef1a49..23c65745550274138bca52ad213f099d5a6119ea 100644 (file)
@@ -4,16 +4,9 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 
-#include <babeltrace2/babeltrace.h>
-
-#include "common/assert.h"
-#include "common/macros.h"
-
 #include "ctf-meta-visitors.hpp"
 
 static int set_int_field_class_meaning_by_name(struct ctf_field_class *fc, const char *field_name,
index 9dec05f20af7129b9ae222cb4ae84f3607514532..a8f5add6dbd989b8e3bf8d18fc279e5c0c0a571e 100644 (file)
@@ -4,15 +4,7 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
-#include <string.h>
-
-#include <babeltrace2/babeltrace.h>
-
-#include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 2e59529faa037f9423dd456b108f5eeffabcbdd2..6c3bfc97901a9637314c81dd54a820a12bb21041 100644 (file)
@@ -4,15 +4,7 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
-#include <string.h>
-
-#include <babeltrace2/babeltrace.h>
-
-#include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index a51b03cfdfb6d3c199fdf6e29e0e2ecac8d1c023..65e4c9fe844705e30d33189d1d45a79554fc8b0f 100644 (file)
@@ -4,15 +4,10 @@
  * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 
-#include <babeltrace2/babeltrace.h>
-
 #include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index c11a0b944c8f2affdc4b62e5d9c9cbc0a23320cc..9a01c593649d684f3d2614f1f753d60d6a513529 100644 (file)
@@ -4,22 +4,13 @@
  * 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 "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 9dd30301fd710f1c78a99465aa70559aaef3ba20..5294ecec4cc04d60ddb119a62cb0949dece82d6c 100644 (file)
@@ -9,8 +9,6 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
 #include "ctf-meta.hpp"
 
 struct meta_log_config;
index 6b31f88e6153a8600e00d3d2886ef60d6fcbc72d..6d7e274a1476e9d2c15dd6001cb9ea1b999b8071 100644 (file)
@@ -4,13 +4,9 @@
  * 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"
@@ -18,7 +14,6 @@
 #include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
 
index 182272415374da7b4caf0f5ba20062482d91a2df..2150465b783d38bd1b3c253122799a6d4ac28488 100644 (file)
@@ -5,9 +5,7 @@
  */
 
 #include <glib.h>
-#include <inttypes.h>
 #include <stdint.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "logging.hpp"
 #include "logging/comp-logging.h"
 
-#include "common/assert.h"
 #include "common/uuid.h"
 #include "compat/memstream.h"
 
-#include "ast.hpp"
 #include "decoder-packetized-file-stream-to-buf.hpp"
 #include "decoder.hpp"
-#include "scanner.hpp"
 
 #define TSDL_MAGIC 0x75d11d57
 
index 25ed5188809690a3e00269a1645931b8456d668b..d4385f4cbbd8a17ba860e3eb95d378b074e9529e 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
 #include "common/uuid.h"
 
-struct ctf_trace_class;
-
-/* A CTF metadata decoder object */
-struct ctf_metadata_decoder;
-
 /* CTF metadata decoder status */
 enum ctf_metadata_decoder_status
 {
index d2cb03f61d4831d3fe325b2e5da6bb72d55edf39..234a1d609aad7d35b74e2702142a74afb9b18b6c 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <babeltrace2/babeltrace.h>
 
+#include "logging/comp-logging.h"
 #include "logging/log.h"
 
 /*
index 2eb938389f7acdb87b9e6bfa3af1eb3f7b459fa9..bdf31e02bc3ac15b620fe0cc391a8eb6a692db9c 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "common/align.h"
 #include "common/list.h"
-#include "common/macros.h"
 
 #include "objstack.hpp"
 
index 52bcd7961a877c5693e0413cab90c38a4dfa6cef..93154b10971e9c37c03175c092120f2e3b4a5d6c 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef _OBJSTACK_H
 #define _OBJSTACK_H
 
-#include "common/macros.h"
-
-struct objstack;
-
 struct objstack *objstack_create(void);
 void objstack_destroy(struct objstack *objstack);
 
index 15e8e4ae6a46834534dadfd762bebab740c18640..dd16e97766773144de61b1088fa225d9f14c0cc3 100644 (file)
@@ -9,8 +9,6 @@
 
 #include <stdio.h>
 
-#include "common/macros.h"
-
 #include "ast.hpp"
 
 #ifndef YY_TYPEDEF_YY_SCANNER_T
index 7d38f85c8fd3d6b8908b71f0f5792de023566216..50a8b541699acc6f8f563fe2843c5a9327e3d3bb 100644 (file)
@@ -9,14 +9,11 @@
 
 #include <string>
 
-#include <ctype.h>
 #include <errno.h>
 #include <glib.h>
 #include <inttypes.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 #include <babeltrace2/babeltrace.h>
 
@@ -36,7 +33,6 @@
 #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 3c0f095d81fd48d5c19984f7f2950e807bdf9c2a..84c504f91b2120bd5ac96dc1e18d1dc203b2e2bb 100644 (file)
@@ -7,25 +7,15 @@
  */
 
 #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 "common/assert.h"
 #include "common/list.h"
-#include "common/macros.h"
 
 #include "ast.hpp"
-#include "scanner.hpp"
 
 static int ctf_visitor_unary_expression(int depth, struct ctf_node *node,
                                         struct meta_log_config *log_cfg)
index 93631fa4e0b9727d7fffde27e871f405b6506d1d..4fad1360c12ddab7dcee41a0e2193396918c5db3 100644 (file)
@@ -7,24 +7,15 @@
  */
 
 #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 "common/assert.h"
 #include "common/list.h"
 
 #include "ast.hpp"
-#include "scanner.hpp"
 
 #define _bt_list_first_entry(ptr, type, member) bt_list_entry((ptr)->next, type, member)
 
index dc4a07eea62d6ef2d9f3320aab110888c2dde83a..79de791cfba17928d58ab1b3f7ea55cfd0b594ee 100644 (file)
@@ -12,8 +12,6 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include <babeltrace2/babeltrace.h>
 
@@ -27,8 +25,7 @@
 
 #include "../bfcr/bfcr.hpp"
 #include "msg-iter.hpp"
-
-struct ctf_msg_iter;
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
 
 /* A visit stack entry */
 struct stack_entry
@@ -50,8 +47,6 @@ struct stack_entry
     size_t index;
 };
 
-struct ctf_msg_iter;
-
 /* Visit stack */
 struct stack
 {
index fc6d5d4d88405df7ebf42a7133dd9c203bc84ef4..0b49c1c6979e4f033349cba0a931520d96e5aae5 100644 (file)
@@ -16,9 +16,7 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
-#include "../metadata/ctf-meta.hpp"
+#include "common/common.h"
 
 /**
  * @file ctf-msg-iter.h
@@ -208,9 +206,6 @@ struct ctf_msg_iter_medium_ops
     bt_stream *(*borrow_stream)(bt_stream_class *stream_class, int64_t stream_id, void *data);
 };
 
-/** CTF message iterator. */
-struct ctf_msg_iter;
-
 /**
  * Creates a CTF message iterator.
  *
index 4e89da7b1289e80d78d484329069323192e635a3..7db4dde951bc84195f55d2319e7375941baf9266 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <stdio.h>
 
-#include "common/macros.h"
-
 #define PERR(fmt, ...)                                                                             \
     do {                                                                                           \
         if (PRINT_ERR_STREAM) {                                                                    \
index 004459511d3c89485e92ececf1a19c677fd093c3..6cde44fe914ae298b451c288c98fdd0bd88b5ada 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_CTF_META_H
 
-#include <ctype.h>
 #include <glib.h>
 #include <stdint.h>
 #include <string.h>
index 540e3d98612c46671eca401fde06f525486adfd6..d56180b14ed7bb0819bc80da903df7077ee9bd7c 100644 (file)
@@ -18,6 +18,7 @@
 #include "compat/endian.h"
 #include "ctfser/ctfser.h"
 
+#include "fs-sink-ctf-meta.hpp"
 #include "fs-sink-stream.hpp"
 #include "fs-sink-trace.hpp"
 #include "fs-sink.hpp"
index e234c4a21dc6f705c7fb2122f83a5fc7b60c26ad..8d559c6a8bac95547cdacc06ed5316f5eaeae20d 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
 #include "ctfser/ctfser.h"
 
-#include "fs-sink-ctf-meta.hpp"
-
-struct fs_sink_trace;
-
 struct fs_sink_stream
 {
     bt_logging_level log_level;
index ea35deb3e204c8b5006174b0e14293762c0f0eff..5466dd645a9b38274de43fcce3250d1f4e047226 100644 (file)
@@ -15,8 +15,8 @@
 #include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include "ctfser/ctfser.h"
 
+#include "fs-sink-ctf-meta.hpp"
 #include "fs-sink-stream.hpp"
 #include "fs-sink-trace.hpp"
 #include "fs-sink.hpp"
index 5ddb678d11d7a1af638e9608da02fff1b651840e..0da8b4b04955b2abd7df0f3216fd3009ae114b51 100644 (file)
@@ -8,17 +8,9 @@
 #define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_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;
-
 struct fs_sink_trace
 {
     bt_logging_level log_level;
index 4aa44c15138d2dc53ac21510830226f640c51bb5..00084b796526e22527fd959651886565e9a782b8 100644 (file)
@@ -23,7 +23,6 @@
 #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 a353cc9f520ea7ca36f81bd3386dcc03bab919fe..3c1e01282f323e2ef6cc397579afc76d0c734c92 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
 struct fs_sink_comp
 {
     bt_logging_level log_level;
index f5f1e46ee4745205edba4b337efe7acf29929242..a67796b8f103adb0514f903cb16ce033615b3235 100644 (file)
@@ -6,12 +6,10 @@
 
 #include <glib.h>
 #include <stdio.h>
-#include <string.h>
 
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "common/macros.h"
 #include "compat/endian.h"
 
 #include "fs-sink-ctf-meta.hpp"
index 1cdefc8173a8899210e86b8f8fa10798c264fa21..1efe100f3e9046c559c4fde81ee3ccba60ea6cff 100644 (file)
@@ -9,10 +9,6 @@
 
 #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);
 
 #endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_TRANSLATE_CTF_IR_TO_TSDL_H */
index 7227e2cd128b53da3570b87a1a1bc3d59845af33..72a29140a4d39509dc5b4156ccebcba85e647144 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "common/assert.h"
 #include "common/common.h"
-#include "common/macros.h"
 
 #include "fs-sink-ctf-meta.hpp"
 #include "fs-sink.hpp"
index 736a160a714478485c1becc4b398339697fb736b..5a3fda6c456b5dcf4a6633731e2cda265e5c8cca 100644 (file)
@@ -9,11 +9,6 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#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,
                                                  const bt_event_class *ir_ec,
index d48984428377d03126b79de2c3b7e41a1feb59c5..698c0129439e27713a02874b39ec6ed3a9bf06a0 100644 (file)
@@ -10,7 +10,6 @@
 #include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include <babeltrace2/babeltrace.h>
 #include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include "common/common.h"
 #include "compat/endian.h"
 #include "compat/mman.h"
 
 #include "../common/msg-iter/msg-iter.hpp"
 #include "data-stream-file.hpp"
 #include "file.hpp"
-#include "metadata.hpp"
+#include "fs.hpp"
+#include "lttng-index.hpp"
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
 
 static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file)
 {
index 1fefeee85f5f92a8b445258f4054e821106eb793..297c859fc451c1a79f1f69c4d6da93e5dd8b0056 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
 #include "../common/msg-iter/msg-iter.hpp"
-#include "lttng-index.hpp"
-
-struct ctf_fs_component;
-struct ctf_fs_file;
-struct ctf_fs_trace;
-struct ctf_fs_ds_file;
-struct ctf_fs_ds_file_group;
-struct ctf_fs_ds_group_medops_data;
 
 struct ctf_fs_ds_file_info
 {
@@ -33,8 +23,6 @@ struct ctf_fs_ds_file_info
     int64_t begin_ns;
 };
 
-struct ctf_fs_metadata;
-
 struct ctf_fs_ds_file
 {
     bt_logging_level log_level;
index 947e09ddc283b6391c1d4e652beb809ef638c490..25a29d0a5e17407b1f9bf396466617f3950a2a5b 100644 (file)
@@ -7,8 +7,6 @@
 #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)
@@ -16,6 +14,7 @@
 #include "logging/comp-logging.h"
 
 #include "file.hpp"
+#include "fs.hpp"
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file)
 {
index c3b524a36a5fc881e9afc2aba498cabbb02d7e04..779c9177c48163959719e3420a346b849dc11c1b 100644 (file)
@@ -7,12 +7,7 @@
 #ifndef CTF_FS_FILE_H
 #define CTF_FS_FILE_H
 
-#include <glib.h>
-#include <stdio.h>
-
-#include "common/macros.h"
-
-#include "fs.hpp"
+#include <babeltrace2/babeltrace.h>
 
 void ctf_fs_file_destroy(struct ctf_fs_file *file);
 
index 1946fdcb87a53214e3d3ef06444f560990bc92c7..53a763dd0f068810a5ab588778475449044ea853 100644 (file)
 #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 "plugins/ctf/common/metadata/ctf-meta.hpp"
 #include "query.hpp"
 
 struct tracer_info
index 13fcb6c8bd169d0928186207cd24039011bbce98..fadef78b78e9c21e44b27297b2107ce6268f6d7d 100644 (file)
 #ifndef BABELTRACE_PLUGIN_CTF_FS_H
 #define BABELTRACE_PLUGIN_CTF_FS_H
 
-#include <babeltrace2/babeltrace.h>
+#include <glib.h>
 
-#include "common/macros.h"
+#include <babeltrace2/babeltrace.h>
 
-#include "../common/metadata/decoder.hpp"
-#include "data-stream-file.hpp"
 #include "metadata.hpp"
 
 extern bool ctf_fs_debug;
index 46f4a4d19195fff7a885cd7379e77052b9b6ad26..1542679de3d00b557fd3239726e455384185cd65 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef LTTNG_INDEX_H
 #define LTTNG_INDEX_H
 
-#include <stddef.h>
-
 #include "compat/limits.h"
 
 #define CTF_INDEX_MAGIC    0xC1F1DCC1
index 562ef981a71c2cda175b613fe5190b408a6c0612..ad215f9fdd216cfbd64c1ee5369ccf5ecefee811 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include <glib.h>
-#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -18,8 +17,6 @@
 #include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include "common/uuid.h"
-#include "compat/memstream.h"
 
 #include "../common/metadata/decoder.hpp"
 #include "file.hpp"
index 3f10a90bcc376995253c9078291c28a2ff9e1440..60790adac50166a1750e9e07e3abc8d79e6122fb 100644 (file)
@@ -7,18 +7,12 @@
 #ifndef CTF_FS_METADATA_H
 #define CTF_FS_METADATA_H
 
-#include <glib.h>
 #include <stdio.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
 #define CTF_FS_METADATA_FILENAME "metadata"
 
-struct ctf_fs_trace;
-struct ctf_fs_metadata;
-
 struct ctf_fs_metadata_config
 {
     bool force_clock_class_origin_unix_epoch;
index a80be2dda78b137ba04b459da7b4c56de07bd478..b11d6f81db23e1938305c7f55263393aa058a705 100644 (file)
@@ -6,10 +6,8 @@
  * Babeltrace CTF file system Reader Component queries
  */
 
-#include <fcntl.h>
 #include <glib.h>
 #include <glib/gstdio.h>
-#include <sys/stat.h>
 #include <sys/types.h>
 
 #include <babeltrace2/babeltrace.h>
@@ -20,8 +18,6 @@
 #include "logging/log.h"
 
 #include "common/assert.h"
-#include "common/common.h"
-#include "common/macros.h"
 
 #include "../common/metadata/decoder.hpp"
 #include "fs.hpp"
index 3b17fb8a72d4806df8615116f7dc68738be9ac69..053540fffa00c2ab8b6e7f3f1813207a6c5f25d4 100644 (file)
@@ -11,8 +11,6 @@
 
 #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 5ab21297db99b79899ea0389c7fd6a6b2aad3a4b..9ad1e9ef8412186cb8ef465d75cbe5d873857492 100644 (file)
 #include <glib.h>
 #include <inttypes.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #include <babeltrace2/babeltrace.h>
 
+#include "plugins/ctf/common/metadata/decoder.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"
index 28b3b95fd333e96bac97258a2ad6dfaa677518b9..d49a9506c5eed8fce809a165cab7ea4b663fc9d6 100644 (file)
@@ -7,11 +7,8 @@
 #ifndef LTTNG_LIVE_DATA_STREAM_H
 #define LTTNG_LIVE_DATA_STREAM_H
 
-#include <glib.h>
 #include <stdint.h>
-#include <stdio.h>
 
-#include "../common/msg-iter/msg-iter.hpp"
 #include "lttng-live.hpp"
 
 enum lttng_live_iterator_status lttng_live_lazy_msg_init(struct lttng_live_session *session,
index 342bd1ea685e39ca944b93ff916dbbc20af6416c..49dc148c2d500001d23291007792a1058a4fc56e 100644 (file)
@@ -20,7 +20,6 @@
 #include "logging/comp-logging.h"
 
 #include "common/assert.h"
-#include "compat/compiler.h"
 
 #include "plugins/common/muxing/muxing.h"
 #include "plugins/common/param-validation/param-validation.h"
index d963e987b628fb5ad50968d36005d5a28a8b017c..9ca87401b70005947a0548d62a6bed262dce1312 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-
-#include "../common/metadata/decoder.hpp"
 #include "../common/msg-iter/msg-iter.hpp"
 #include "viewer-connection.hpp"
 
-struct lttng_live_component;
-struct lttng_live_session;
-struct lttng_live_msg_iter;
-
 enum lttng_live_stream_state
 {
     /* This stream won't have data until some known time in the future. */
index 798d480989da811d22f15ccd9efa974a632af962..49596c3b51234f2acd63ea7636125461fcf91eec 100644 (file)
@@ -8,7 +8,6 @@
 #define LTTNG_LIVE_METADATA_H
 
 #include <stdint.h>
-#include <stdio.h>
 
 #include "lttng-live.hpp"
 
index 41e81ec8e07c9e0e6255dc6350b0d27f0f9014cf..02c7e6ace88794b303f1b45bbc844ebb0df1e2da 100644 (file)
@@ -5,13 +5,9 @@
  * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <fcntl.h>
 #include <glib.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 #include <babeltrace2/babeltrace.h>
 
@@ -21,7 +17,6 @@
 #include "logging/comp-logging.h"
 
 #include "common/common.h"
-#include "compat/compiler.h"
 #include "compat/endian.h"
 #include "compat/socket.h"
 
index 59316371066eec9a5fc327d13419e598b42c710e..67e71e0c3770cb925fffa13e6f399c3afd8fbe27 100644 (file)
@@ -9,11 +9,9 @@
 
 #include <glib.h>
 #include <stdint.h>
-#include <stdio.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
 #include "compat/socket.h"
 
 #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
@@ -46,8 +44,6 @@ enum lttng_live_get_one_metadata_status
     LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED = -3,
 };
 
-struct lttng_live_component;
-
 struct live_viewer_connection
 {
     bt_logging_level log_level;
index 53984752a85576deab3cb565ea3b04dccc0f3c30..c5992e3bc56b10f70995a3ce249b2f42c5196577 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <iostream>
 
-#include <assert.h>
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
This page took 0.051177 seconds and 4 git commands to generate.