From 578e048b5debf169e286e5b5cc747b5d6c16886d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 10 Jun 2019 17:44:09 -0400 Subject: [PATCH] Re-organize sources * Create a top-level 'src' directory. * Move all private headers from the public include directory to the 'src' directory. * Rename all those private headers to remove the 'internal' notation. * Use double quotes in `#include` directives when including a private header so that we can easily know. Change-Id: I05fbb81d969b3735aaf303ec2c222be7142c19ab Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/1413 Tested-by: jenkins Reviewed-by: Philippe Proulx --- .gitignore | 28 +-- CONTRIBUTING.adoc | 20 +-- LICENSE | 2 +- Makefile.am | 20 +-- common/Makefile.am | 6 - compat/Makefile.am | 12 -- configure.ac | 101 +++++------ doc/api/Doxyfile.in | 2 +- doc/bindings/python/Makefile.am | 4 +- include/Makefile.am | 166 ------------------ lib/Makefile.am | 26 --- lib/prio_heap/Makefile.am | 3 - plugins/utils/muxer/logging.h | 31 ---- src/Makefile.am | 15 ++ .../babeltrace2-ctf-writer.pc.in | 0 babeltrace2.pc.in => src/babeltrace2.pc.in | 0 {bindings => src/bindings}/Makefile.am | 0 {bindings => src/bindings}/python/Makefile.am | 0 .../bindings}/python/bt2/.gitignore | 0 .../bindings}/python/bt2/Makefile.am | 2 +- .../bindings}/python/bt2/bt2/__init__.py.in | 0 .../bindings}/python/bt2/bt2/clock_class.py | 0 .../python/bt2/bt2/clock_snapshot.py | 0 .../bindings}/python/bt2/bt2/component.py | 0 .../bindings}/python/bt2/bt2/connection.py | 0 .../bindings}/python/bt2/bt2/event.py | 0 .../bindings}/python/bt2/bt2/event_class.py | 0 .../bindings}/python/bt2/bt2/field.py | 0 .../bindings}/python/bt2/bt2/field_class.py | 0 .../bindings}/python/bt2/bt2/field_path.py | 0 .../bindings}/python/bt2/bt2/graph.py | 0 .../bindings}/python/bt2/bt2/logging.c | 2 +- .../bindings}/python/bt2/bt2/logging.h | 2 +- .../bindings}/python/bt2/bt2/logging.py | 0 .../bindings}/python/bt2/bt2/message.py | 0 .../python/bt2/bt2/message_iterator.py | 0 .../bindings}/python/bt2/bt2/native_bt.i | 2 +- .../python/bt2/bt2/native_bt_clock_class.i | 0 .../python/bt2/bt2/native_bt_clock_snapshot.i | 0 .../python/bt2/bt2/native_bt_component.i | 0 .../bt2/bt2/native_bt_component_class.i | 0 .../python/bt2/bt2/native_bt_connection.i | 0 .../python/bt2/bt2/native_bt_event.i | 0 .../python/bt2/bt2/native_bt_event_class.i | 0 .../python/bt2/bt2/native_bt_field.i | 0 .../python/bt2/bt2/native_bt_field_class.i | 0 .../python/bt2/bt2/native_bt_field_path.i | 0 .../python/bt2/bt2/native_bt_graph.i | 0 .../python/bt2/bt2/native_bt_logging.i | 0 .../python/bt2/bt2/native_bt_message.i | 0 .../python/bt2/bt2/native_bt_notifier.i | 0 .../python/bt2/bt2/native_bt_packet.i | 0 .../python/bt2/bt2/native_bt_plugin.i | 0 .../bindings}/python/bt2/bt2/native_bt_port.i | 0 .../python/bt2/bt2/native_bt_query_exec.i | 0 .../python/bt2/bt2/native_bt_stream.i | 0 .../python/bt2/bt2/native_bt_stream_class.i | 0 .../python/bt2/bt2/native_bt_trace.i | 0 .../python/bt2/bt2/native_bt_trace_class.i | 0 .../python/bt2/bt2/native_bt_value.i | 0 .../python/bt2/bt2/native_bt_version.i | 0 .../bindings}/python/bt2/bt2/object.py | 0 .../bindings}/python/bt2/bt2/packet.py | 0 .../bindings}/python/bt2/bt2/plugin.py | 0 .../bindings}/python/bt2/bt2/port.py | 0 .../bindings}/python/bt2/bt2/py_plugin.py | 0 .../python/bt2/bt2/query_executor.py | 0 .../bindings}/python/bt2/bt2/stream.py | 0 .../bindings}/python/bt2/bt2/stream_class.py | 0 .../bindings}/python/bt2/bt2/trace.py | 0 .../bindings}/python/bt2/bt2/trace_class.py | 0 .../bt2/trace_collection_message_iterator.py | 0 .../bindings}/python/bt2/bt2/utils.py | 0 .../bindings}/python/bt2/bt2/value.py | 0 .../bindings}/python/bt2/setup.py.in | 4 +- {cli => src/cli}/Makefile.am | 18 +- .../cli}/babeltrace2-cfg-cli-args-connect.c | 2 +- .../cli}/babeltrace2-cfg-cli-args-connect.h | 0 .../cli}/babeltrace2-cfg-cli-args-default.c | 0 .../cli}/babeltrace2-cfg-cli-args-default.h | 0 {cli => src/cli}/babeltrace2-cfg-cli-args.c | 6 +- {cli => src/cli}/babeltrace2-cfg-cli-args.h | 4 +- {cli => src/cli}/babeltrace2-cfg.c | 2 +- {cli => src/cli}/babeltrace2-cfg.h | 4 +- {cli => src/cli}/babeltrace2-log.c | 2 +- {cli => src/cli}/babeltrace2.c | 2 +- {cli => src/cli}/logging.c | 2 +- {cli => src/cli}/logging.h | 2 +- src/common/Makefile.am | 89 ++++++++++ .../align-internal.h => src/common/align.h | 4 +- {common => src/common}/assert.c | 4 +- .../assert-internal.h => src/common/assert.h | 2 +- .../common/babeltrace.h | 2 +- {common => src/common}/common.c | 8 +- .../common-internal.h => src/common/common.h | 4 +- .../list-internal.h => src/common/list.h | 0 {common => src/common}/logging.c | 2 +- {common => src/common}/logging.h | 2 +- .../common/mmap-align.h | 6 +- {include => src/common}/version.h | 2 +- src/compat/Makefile.am | 32 ++++ .../compat/bitfield.h | 4 +- .../compat/compiler.h | 0 .../endian-internal.h => src/compat/endian.h | 0 .../fcntl-internal.h => src/compat/fcntl.h | 0 .../glib-internal.h => src/compat/glib.h | 0 .../limits-internal.h => src/compat/limits.h | 0 {compat => src/compat}/logging.c | 2 +- {compat => src/compat}/logging.h | 2 +- .../compat/memstream.h | 2 +- compat/compat_mman.c => src/compat/mman.c | 2 +- .../mman-internal.h => src/compat/mman.h | 0 .../socket-internal.h => src/compat/socket.h | 0 .../stdio-internal.h => src/compat/stdio.h | 2 +- .../stdlib-internal.h => src/compat/stdlib.h | 0 .../string-internal.h => src/compat/string.h | 0 .../time-internal.h => src/compat/time.h | 0 .../unistd-internal.h => src/compat/unistd.h | 0 .../compat/utc-internal.h => src/compat/utc.h | 0 compat/compat_uuid.c => src/compat/uuid.c | 2 +- .../uuid-internal.h => src/compat/uuid.h | 0 {ctf-writer => src/ctf-writer}/Makefile.am | 32 +++- .../ctf-writer/assert-pre.h | 12 +- {ctf-writer => src/ctf-writer}/attributes.c | 11 +- .../ctf-writer/attributes.h | 5 +- {ctf-writer => src/ctf-writer}/clock-class.c | 15 +- .../ctf-writer/clock-class.h | 9 +- {ctf-writer => src/ctf-writer}/clock.c | 15 +- .../ctf-writer/clock.h | 11 +- {ctf-writer => src/ctf-writer}/event-class.c | 42 ++--- .../ctf-writer/event-class.h | 11 +- {ctf-writer => src/ctf-writer}/event.c | 37 ++-- .../ctf-writer/event.h | 25 +-- {ctf-writer => src/ctf-writer}/field-path.c | 11 +- .../ctf-writer/field-path.h | 7 +- {ctf-writer => src/ctf-writer}/field-types.c | 33 ++-- .../ctf-writer/field-types.h | 12 +- .../ctf-writer}/field-wrapper.c | 10 +- .../ctf-writer/field-wrapper.h | 8 +- {ctf-writer => src/ctf-writer}/fields.c | 26 +-- .../ctf-writer/fields.h | 27 +-- {ctf-writer => src/ctf-writer}/functor.c | 5 +- .../ctf-writer/functor.h | 2 +- {ctf-writer => src/ctf-writer}/logging.c | 2 +- {ctf-writer => src/ctf-writer}/logging.h | 2 +- {ctf-writer => src/ctf-writer}/object-pool.c | 6 +- .../ctf-writer/object-pool.h | 3 +- {ctf-writer => src/ctf-writer}/object.c | 2 +- .../ctf-writer/object.h | 4 +- {ctf-writer => src/ctf-writer}/resolve.c | 23 +-- .../ctf-writer/resolve.h | 7 +- {ctf-writer => src/ctf-writer}/stream-class.c | 43 ++--- .../ctf-writer/stream-class.h | 19 +- {ctf-writer => src/ctf-writer}/stream.c | 35 ++-- .../ctf-writer/stream.h | 15 +- {ctf-writer => src/ctf-writer}/trace.c | 49 +++--- .../ctf-writer/trace.h | 19 +- {ctf-writer => src/ctf-writer}/utils.c | 13 +- .../ctf-writer/utils.h | 5 +- {ctf-writer => src/ctf-writer}/validation.c | 22 +-- .../ctf-writer/validation.h | 5 +- {ctf-writer => src/ctf-writer}/values.c | 19 +- .../ctf-writer/values.h | 2 +- {ctf-writer => src/ctf-writer}/visitor.c | 5 +- .../ctf-writer/visitor.h | 2 +- {ctf-writer => src/ctf-writer}/writer.c | 29 +-- .../ctf-writer/writer.h | 11 +- {ctfser => src/ctfser}/Makefile.am | 6 +- {ctfser => src/ctfser}/ctfser.c | 12 +- .../ctfser-internal.h => src/ctfser/ctfser.h | 14 +- {ctfser => src/ctfser}/logging.c | 2 +- {ctfser => src/ctfser}/logging.h | 2 +- {fd-cache => src/fd-cache}/Makefile.am | 1 + {fd-cache => src/fd-cache}/fd-cache.c | 4 +- .../fd-cache/fd-cache.h | 4 +- {fd-cache => src/fd-cache}/logging.c | 2 +- {fd-cache => src/fd-cache}/logging.h | 2 +- src/lib/Makefile.am | 33 ++++ .../lib/assert-pre.h | 12 +- {lib => src/lib}/babeltrace2.c | 0 {lib => src/lib}/graph/Makefile.am | 16 +- .../graph/component-class-sink-colander.c | 11 +- .../lib/graph/component-class-sink-colander.h | 0 {lib => src/lib}/graph/component-class.c | 11 +- .../lib/graph/component-class.h | 6 +- {lib => src/lib}/graph/component-filter.c | 15 +- .../lib/graph/component-filter.h | 7 +- {lib => src/lib}/graph/component-sink.c | 13 +- .../lib/graph/component-sink.h | 9 +- {lib => src/lib}/graph/component-source.c | 17 +- .../lib/graph/component-source.h | 7 +- {lib => src/lib}/graph/component.c | 31 ++-- .../lib/graph/component.h | 11 +- {lib => src/lib}/graph/connection.c | 21 +-- .../lib/graph/connection.h | 7 +- {lib => src/lib}/graph/graph.c | 27 +-- .../graph-internal.h => src/lib/graph/graph.h | 15 +- {lib => src/lib}/graph/iterator.c | 49 +++--- {lib => src/lib}/graph/message/Makefile.am | 16 +- .../lib}/graph/message/discarded-items.c | 21 +-- .../lib/graph/message/discarded-items.h | 8 +- {lib => src/lib}/graph/message/event.c | 23 +-- .../lib/graph/message/event.h | 7 +- .../lib/graph/message/iterator.h | 6 +- .../message/message-iterator-inactivity.c | 15 +- .../message/message-iterator-inactivity.h | 2 +- {lib => src/lib}/graph/message/message.c | 10 +- .../lib/graph/message/message.h | 8 +- {lib => src/lib}/graph/message/packet.c | 21 +-- .../lib/graph/message/packet.h | 9 +- .../lib}/graph/message/stream-activity.c | 19 +- .../lib/graph/message/stream-activity.h | 4 +- {lib => src/lib}/graph/message/stream.c | 15 +- .../lib/graph/message/stream.h | 11 +- {lib => src/lib}/graph/port.c | 17 +- .../port-internal.h => src/lib/graph/port.h | 0 {lib => src/lib}/graph/query-executor.c | 15 +- .../lib/graph/query-executor.h | 2 +- {lib => src/lib}/lib-logging.c | 78 ++++---- .../lib/lib-logging.h | 4 +- {lib => src/lib}/logging.c | 2 +- {lib => src/lib}/object-pool.c | 8 +- .../lib/object-pool.h | 2 +- .../object-internal.h => src/lib/object.h | 4 +- {lib => src/lib}/plugin/Makefile.am | 4 +- {lib => src/lib}/plugin/plugin-so.c | 18 +- .../lib/plugin/plugin-so.h | 0 {lib => src/lib}/plugin/plugin.c | 23 +-- .../lib/plugin/plugin.h | 13 +- src/lib/prio-heap/Makefile.am | 5 + .../lib/prio-heap/prio-heap.c | 7 +- .../lib/prio-heap/prio-heap.h | 2 +- .../property-internal.h => src/lib/property.h | 2 +- {lib => src/lib}/trace-ir/Makefile.am | 21 ++- {lib => src/lib}/trace-ir/attributes.c | 16 +- .../lib/trace-ir/attributes.h | 2 +- {lib => src/lib}/trace-ir/clock-class.c | 20 +-- .../lib/trace-ir/clock-class.h | 14 +- .../lib/trace-ir/clock-snapshot-set.h | 7 +- {lib => src/lib}/trace-ir/clock-snapshot.c | 18 +- .../lib/trace-ir/clock-snapshot.h | 9 +- {lib => src/lib}/trace-ir/event-class.c | 33 ++-- .../lib/trace-ir/event-class.h | 15 +- {lib => src/lib}/trace-ir/event.c | 29 +-- .../lib/trace-ir/event.h | 21 +-- {lib => src/lib}/trace-ir/field-class.c | 25 +-- .../lib/trace-ir/field-class.h | 6 +- {lib => src/lib}/trace-ir/field-path.c | 11 +- .../lib/trace-ir/field-path.h | 4 +- {lib => src/lib}/trace-ir/field-wrapper.c | 11 +- .../lib/trace-ir/field-wrapper.h | 7 +- {lib => src/lib}/trace-ir/field.c | 19 +- .../lib/trace-ir/field.h | 13 +- .../lib}/trace-ir/packet-context-field.c | 11 +- {lib => src/lib}/trace-ir/packet.c | 21 +-- .../lib/trace-ir/packet.h | 11 +- .../lib}/trace-ir/resolve-field-path.c | 13 +- .../lib/trace-ir/resolve-field-path.h | 2 +- {lib => src/lib}/trace-ir/stream-class.c | 35 ++-- .../lib/trace-ir/stream-class.h | 15 +- {lib => src/lib}/trace-ir/stream.c | 21 +-- .../lib/trace-ir/stream.h | 9 +- {lib => src/lib}/trace-ir/trace-class.c | 41 ++--- .../lib/trace-ir/trace-class.h | 17 +- {lib => src/lib}/trace-ir/trace.c | 43 ++--- .../lib/trace-ir/trace.h | 19 +- {lib => src/lib}/trace-ir/utils.c | 7 +- .../lib/trace-ir/utils.h | 5 +- {lib => src/lib}/util.c | 6 +- {lib => src/lib}/value.c | 14 +- .../value-internal.h => src/lib/value.h | 2 +- {logging => src/logging}/LICENSE | 0 {logging => src/logging}/Makefile.am | 2 +- {logging => src/logging}/log.c | 10 +- .../logging-internal.h => src/logging/log.h | 20 +-- {plugins => src/plugins}/Makefile.am | 0 {plugins => src/plugins}/ctf/Makefile.am | 8 +- .../plugins}/ctf/common/Makefile.am | 0 .../plugins}/ctf/common/bfcr/Makefile.am | 0 .../plugins}/ctf/common/bfcr/bfcr.c | 8 +- .../plugins}/ctf/common/bfcr/bfcr.h | 2 +- .../plugins}/ctf/common/bfcr/btr.gdb | 0 .../plugins}/ctf/common/bfcr/logging.c | 2 +- .../plugins}/ctf/common/bfcr/logging.h | 2 +- .../plugins}/ctf/common/metadata/Makefile.am | 0 .../plugins}/ctf/common/metadata/ast.h | 4 +- .../ctf/common/metadata/ctf-meta-resolve.c | 6 +- .../ctf/common/metadata/ctf-meta-translate.c | 4 +- .../ctf-meta-update-default-clock-classes.c | 4 +- .../common/metadata/ctf-meta-update-in-ir.c | 8 +- .../metadata/ctf-meta-update-meanings.c | 4 +- .../ctf-meta-update-stream-class-config.c | 4 +- .../ctf-meta-update-text-array-sequence.c | 4 +- .../ctf-meta-update-value-storing-indexes.c | 4 +- .../ctf/common/metadata/ctf-meta-validate.c | 4 +- .../ctf/common/metadata/ctf-meta-visitors.h | 2 +- .../ctf-meta-warn-meaningless-header-fields.c | 4 +- .../plugins}/ctf/common/metadata/ctf-meta.h | 4 +- .../plugins}/ctf/common/metadata/decoder.c | 6 +- .../plugins}/ctf/common/metadata/decoder.h | 0 .../plugins}/ctf/common/metadata/lexer.l | 0 .../plugins}/ctf/common/metadata/logging.c | 2 +- .../plugins}/ctf/common/metadata/logging.h | 2 +- .../plugins}/ctf/common/metadata/objstack.c | 6 +- .../plugins}/ctf/common/metadata/objstack.h | 0 .../plugins}/ctf/common/metadata/parser.y | 4 +- .../ctf/common/metadata/scanner-symbols.h | 0 .../plugins}/ctf/common/metadata/scanner.h | 0 .../ctf/common/metadata/visitor-generate-ir.c | 8 +- .../common/metadata/visitor-parent-links.c | 6 +- .../metadata/visitor-semantic-validator.c | 4 +- .../plugins}/ctf/common/msg-iter/Makefile.am | 0 .../plugins}/ctf/common/msg-iter/logging.c | 2 +- .../plugins}/ctf/common/msg-iter/logging.h | 2 +- .../plugins}/ctf/common/msg-iter/msg-iter.c | 4 +- .../plugins}/ctf/common/msg-iter/msg-iter.h | 2 +- {plugins => src/plugins}/ctf/common/print.h | 2 +- .../plugins}/ctf/common/utils/Makefile.am | 0 .../plugins}/ctf/common/utils/logging.c | 2 +- .../plugins}/ctf/common/utils/logging.h | 2 +- .../plugins}/ctf/common/utils/utils.c | 0 .../plugins}/ctf/common/utils/utils.h | 2 +- .../plugins}/ctf/fs-sink/Makefile.am | 0 .../plugins}/ctf/fs-sink/fs-sink-ctf-meta.h | 6 +- .../plugins}/ctf/fs-sink/fs-sink-stream.c | 6 +- .../plugins}/ctf/fs-sink/fs-sink-stream.h | 4 +- .../plugins}/ctf/fs-sink/fs-sink-trace.c | 4 +- .../plugins}/ctf/fs-sink/fs-sink-trace.h | 4 +- .../plugins}/ctf/fs-sink/fs-sink.c | 4 +- .../plugins}/ctf/fs-sink/fs-sink.h | 2 +- .../plugins}/ctf/fs-sink/logging.c | 2 +- .../plugins}/ctf/fs-sink/logging.h | 2 +- .../ctf/fs-sink/translate-ctf-ir-to-tsdl.c | 6 +- .../ctf/fs-sink/translate-ctf-ir-to-tsdl.h | 0 .../fs-sink/translate-trace-ir-to-ctf-ir.c | 6 +- .../fs-sink/translate-trace-ir-to-ctf-ir.h | 2 +- .../plugins}/ctf/fs-src/Makefile.am | 2 - .../plugins}/ctf/fs-src/data-stream-file.c | 8 +- .../plugins}/ctf/fs-src/data-stream-file.h | 2 +- {plugins => src/plugins}/ctf/fs-src/file.c | 0 {plugins => src/plugins}/ctf/fs-src/file.h | 2 +- {plugins => src/plugins}/ctf/fs-src/fs.c | 8 +- {plugins => src/plugins}/ctf/fs-src/fs.h | 2 +- {plugins => src/plugins}/ctf/fs-src/logging.c | 2 +- {plugins => src/plugins}/ctf/fs-src/logging.h | 2 +- .../plugins}/ctf/fs-src/lttng-index.h | 2 +- .../plugins}/ctf/fs-src/metadata.c | 6 +- .../plugins}/ctf/fs-src/metadata.h | 2 +- {plugins => src/plugins}/ctf/fs-src/query.c | 6 +- {plugins => src/plugins}/ctf/fs-src/query.h | 2 +- .../plugins}/ctf/lttng-live/Makefile.am | 2 - .../plugins}/ctf/lttng-live/data-stream.c | 4 +- .../plugins}/ctf/lttng-live/data-stream.h | 2 +- .../plugins}/ctf/lttng-live/logging.c | 2 +- .../plugins}/ctf/lttng-live/logging.h | 2 +- .../plugins}/ctf/lttng-live/lttng-live.c | 6 +- .../plugins}/ctf/lttng-live/lttng-live.h | 2 +- .../ctf/lttng-live/lttng-viewer-abi.h | 2 +- .../plugins}/ctf/lttng-live/metadata.c | 2 +- .../plugins}/ctf/lttng-live/metadata.h | 2 +- .../ctf/lttng-live/viewer-connection.c | 8 +- .../ctf/lttng-live/viewer-connection.h | 6 +- {plugins => src/plugins}/ctf/plugin.c | 0 {plugins => src/plugins}/ctf/print.h | 0 .../plugins}/lttng-utils/Makefile.am | 8 +- .../lttng-utils/debug-info/Makefile.am | 4 +- .../lttng-utils/debug-info/bin-info.c | 2 +- .../lttng-utils/debug-info/bin-info.h | 4 +- .../plugins}/lttng-utils/debug-info/crc32.c | 0 .../plugins}/lttng-utils/debug-info/crc32.h | 2 +- .../lttng-utils/debug-info/debug-info.c | 8 +- .../lttng-utils/debug-info/debug-info.h | 2 +- .../plugins}/lttng-utils/debug-info/dwarf.c | 0 .../plugins}/lttng-utils/debug-info/dwarf.h | 2 +- .../plugins}/lttng-utils/debug-info/logging.c | 2 +- .../plugins}/lttng-utils/debug-info/logging.h | 2 +- .../debug-info/trace-ir-data-copy.c | 2 +- .../debug-info/trace-ir-data-copy.h | 0 .../lttng-utils/debug-info/trace-ir-mapping.c | 2 +- .../lttng-utils/debug-info/trace-ir-mapping.h | 2 +- .../debug-info/trace-ir-metadata-copy.c | 2 +- .../debug-info/trace-ir-metadata-copy.h | 0 .../trace-ir-metadata-field-class-copy.c | 6 +- .../trace-ir-metadata-field-class-copy.h | 0 .../plugins}/lttng-utils/debug-info/utils.c | 0 .../plugins}/lttng-utils/debug-info/utils.h | 2 +- {plugins => src/plugins}/lttng-utils/plugin.c | 0 {plugins => src/plugins}/plugins-common.h | 0 {plugins => src/plugins}/text/Makefile.am | 10 +- .../plugins}/text/dmesg/Makefile.am | 2 - {plugins => src/plugins}/text/dmesg/dmesg.c | 10 +- {plugins => src/plugins}/text/dmesg/dmesg.h | 2 +- {plugins => src/plugins}/text/dmesg/logging.c | 2 +- {plugins => src/plugins}/text/dmesg/logging.h | 2 +- {plugins => src/plugins}/text/plugin.c | 0 .../plugins}/text/pretty/Makefile.am | 2 - .../plugins}/text/pretty/logging.c | 2 +- .../plugins}/text/pretty/logging.h | 2 +- {plugins => src/plugins}/text/pretty/pretty.c | 8 +- {plugins => src/plugins}/text/pretty/pretty.h | 2 +- {plugins => src/plugins}/text/pretty/print.c | 8 +- {plugins => src/plugins}/utils/Makefile.am | 10 +- .../plugins}/utils/counter/Makefile.am | 2 - .../plugins}/utils/counter/counter.c | 8 +- .../plugins}/utils/counter/counter.h | 0 .../plugins}/utils/counter/logging.c | 2 +- src/plugins/utils/counter/logging.h | 31 ++++ .../plugins}/utils/dummy/Makefile.am | 2 - {plugins => src/plugins}/utils/dummy/dummy.c | 6 +- {plugins => src/plugins}/utils/dummy/dummy.h | 2 +- .../plugins}/utils/muxer/Makefile.am | 2 - .../plugins}/utils/muxer/logging.c | 2 +- .../plugins/utils/muxer}/logging.h | 2 +- {plugins => src/plugins}/utils/muxer/muxer.c | 18 +- {plugins => src/plugins}/utils/muxer/muxer.h | 2 +- {plugins => src/plugins}/utils/plugin.c | 0 .../plugins}/utils/trimmer/Makefile.am | 3 - .../plugins}/utils/trimmer/logging.c | 2 +- .../plugins}/utils/trimmer/logging.h | 2 +- .../plugins}/utils/trimmer/trimmer.c | 10 +- .../plugins}/utils/trimmer/trimmer.h | 2 +- .../python-plugin-provider}/Makefile.am | 10 +- .../python-plugin-provider.c | 8 +- .../python-plugin-provider.h | 0 tests/bindings/python/bt2/test_python_bt2.in | 10 +- tests/lib/Makefile.am | 12 +- tests/lib/test-plugin-plugins/Makefile.am | 4 +- tests/lib/test-plugin-plugins/sfs.c | 2 +- tests/lib/test_bitfield.c | 2 +- tests/lib/test_bt_values.c | 2 +- tests/lib/test_ctf_writer.c | 8 +- tests/lib/test_graph_topo.c | 2 +- tests/lib/test_plugin.c | 2 +- tests/lib/test_trace_ir_ref.c | 6 +- tests/lib/trace-ir/test_trace_ir.in | 6 +- tests/plugins/Makefile.am | 18 +- tests/plugins/test_bin_info.c | 4 +- tests/plugins/test_lttng_utils_debug_info.in | 8 +- .../test_python_plugin_provider.in | 6 +- .../test_python_plugin_provider_env.in | 6 +- tests/utils/common.sh.in | 2 +- tests/utils/test_python_bt2_env.in | 10 +- 442 files changed, 1743 insertions(+), 1631 deletions(-) delete mode 100644 common/Makefile.am delete mode 100644 compat/Makefile.am delete mode 100644 lib/Makefile.am delete mode 100644 lib/prio_heap/Makefile.am delete mode 100644 plugins/utils/muxer/logging.h create mode 100644 src/Makefile.am rename babeltrace2-ctf-writer.pc.in => src/babeltrace2-ctf-writer.pc.in (100%) rename babeltrace2.pc.in => src/babeltrace2.pc.in (100%) rename {bindings => src/bindings}/Makefile.am (100%) rename {bindings => src/bindings}/python/Makefile.am (100%) rename {bindings => src/bindings}/python/bt2/.gitignore (100%) rename {bindings => src/bindings}/python/bt2/Makefile.am (98%) rename {bindings => src/bindings}/python/bt2/bt2/__init__.py.in (100%) rename {bindings => src/bindings}/python/bt2/bt2/clock_class.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/clock_snapshot.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/component.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/connection.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/event.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/event_class.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/field.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/field_class.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/field_path.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/graph.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/logging.c (96%) rename {bindings => src/bindings}/python/bt2/bt2/logging.h (97%) rename {bindings => src/bindings}/python/bt2/bt2/logging.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/message.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/message_iterator.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt.i (99%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_clock_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_clock_snapshot.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_component.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_component_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_connection.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_event.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_event_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_field.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_field_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_field_path.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_graph.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_logging.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_message.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_notifier.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_packet.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_plugin.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_port.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_query_exec.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_stream.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_stream_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_trace.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_trace_class.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_value.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/native_bt_version.i (100%) rename {bindings => src/bindings}/python/bt2/bt2/object.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/packet.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/plugin.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/port.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/py_plugin.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/query_executor.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/stream.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/stream_class.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/trace.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/trace_class.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/trace_collection_message_iterator.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/utils.py (100%) rename {bindings => src/bindings}/python/bt2/bt2/value.py (100%) rename {bindings => src/bindings}/python/bt2/setup.py.in (95%) rename {cli => src/cli}/Makefile.am (88%) rename {cli => src/cli}/babeltrace2-cfg-cli-args-connect.c (99%) rename {cli => src/cli}/babeltrace2-cfg-cli-args-connect.h (100%) rename {cli => src/cli}/babeltrace2-cfg-cli-args-default.c (100%) rename {cli => src/cli}/babeltrace2-cfg-cli-args-default.h (100%) rename {cli => src/cli}/babeltrace2-cfg-cli-args.c (99%) rename {cli => src/cli}/babeltrace2-cfg-cli-args.h (95%) rename {cli => src/cli}/babeltrace2-cfg.c (98%) rename {cli => src/cli}/babeltrace2-cfg.h (97%) rename {cli => src/cli}/babeltrace2-log.c (99%) rename {cli => src/cli}/babeltrace2.c (99%) rename {cli => src/cli}/logging.c (96%) rename {cli => src/cli}/logging.h (96%) create mode 100644 src/common/Makefile.am rename include/babeltrace2/align-internal.h => src/common/align.h (97%) rename {common => src/common}/assert.c (95%) rename include/babeltrace2/assert-internal.h => src/common/assert.h (98%) rename include/babeltrace2/babeltrace-internal.h => src/common/babeltrace.h (98%) rename {common => src/common}/common.c (99%) rename include/babeltrace2/common-internal.h => src/common/common.h (99%) rename include/babeltrace2/list-internal.h => src/common/list.h (100%) rename {common => src/common}/logging.c (96%) rename {common => src/common}/logging.h (96%) rename include/babeltrace2/mmap-align-internal.h => src/common/mmap-align.h (96%) rename {include => src/common}/version.h (97%) create mode 100644 src/compat/Makefile.am rename include/babeltrace2/bitfield-internal.h => src/compat/bitfield.h (99%) rename include/babeltrace2/compiler-internal.h => src/compat/compiler.h (100%) rename include/babeltrace2/endian-internal.h => src/compat/endian.h (100%) rename include/babeltrace2/compat/fcntl-internal.h => src/compat/fcntl.h (100%) rename include/babeltrace2/compat/glib-internal.h => src/compat/glib.h (100%) rename include/babeltrace2/compat/limits-internal.h => src/compat/limits.h (100%) rename {compat => src/compat}/logging.c (96%) rename {compat => src/compat}/logging.h (96%) rename include/babeltrace2/compat/memstream-internal.h => src/compat/memstream.h (99%) rename compat/compat_mman.c => src/compat/mman.c (99%) rename include/babeltrace2/compat/mman-internal.h => src/compat/mman.h (100%) rename include/babeltrace2/compat/socket-internal.h => src/compat/socket.h (100%) rename include/babeltrace2/compat/stdio-internal.h => src/compat/stdio.h (98%) rename include/babeltrace2/compat/stdlib-internal.h => src/compat/stdlib.h (100%) rename include/babeltrace2/compat/string-internal.h => src/compat/string.h (100%) rename include/babeltrace2/compat/time-internal.h => src/compat/time.h (100%) rename include/babeltrace2/compat/unistd-internal.h => src/compat/unistd.h (100%) rename include/babeltrace2/compat/utc-internal.h => src/compat/utc.h (100%) rename compat/compat_uuid.c => src/compat/uuid.c (98%) rename include/babeltrace2/compat/uuid-internal.h => src/compat/uuid.h (100%) rename {ctf-writer => src/ctf-writer}/Makefile.am (51%) rename include/babeltrace2/ctf-writer/assert-pre-internal.h => src/ctf-writer/assert-pre.h (91%) rename {ctf-writer => src/ctf-writer}/attributes.c (97%) rename include/babeltrace2/ctf-writer/attributes-internal.h => src/ctf-writer/attributes.h (95%) rename {ctf-writer => src/ctf-writer}/clock-class.c (98%) rename include/babeltrace2/ctf-writer/clock-class-internal.h => src/ctf-writer/clock-class.h (95%) rename {ctf-writer => src/ctf-writer}/clock.c (96%) rename include/babeltrace2/ctf-writer/clock-internal.h => src/ctf-writer/clock.h (87%) rename {ctf-writer => src/ctf-writer}/event-class.c (95%) rename include/babeltrace2/ctf-writer/event-class-internal.h => src/ctf-writer/event-class.h (98%) rename {ctf-writer => src/ctf-writer}/event.c (97%) rename include/babeltrace2/ctf-writer/event-internal.h => src/ctf-writer/event.h (92%) rename {ctf-writer => src/ctf-writer}/field-path.c (96%) rename include/babeltrace2/ctf-writer/field-path-internal.h => src/ctf-writer/field-path.h (94%) rename {ctf-writer => src/ctf-writer}/field-types.c (99%) rename include/babeltrace2/ctf-writer/field-types-internal.h => src/ctf-writer/field-types.h (98%) rename {ctf-writer => src/ctf-writer}/field-wrapper.c (92%) rename include/babeltrace2/ctf-writer/field-wrapper-internal.h => src/ctf-writer/field-wrapper.h (91%) rename {ctf-writer => src/ctf-writer}/fields.c (99%) rename include/babeltrace2/ctf-writer/fields-internal.h => src/ctf-writer/fields.h (98%) rename {ctf-writer => src/ctf-writer}/functor.c (93%) rename include/babeltrace2/ctf-writer/functor-internal.h => src/ctf-writer/functor.h (97%) rename {ctf-writer => src/ctf-writer}/logging.c (98%) rename {ctf-writer => src/ctf-writer}/logging.h (97%) rename {ctf-writer => src/ctf-writer}/object-pool.c (96%) rename include/babeltrace2/ctf-writer/object-pool-internal.h => src/ctf-writer/object-pool.h (99%) rename {ctf-writer => src/ctf-writer}/object.c (96%) rename include/babeltrace2/ctf-writer/object-internal.h => src/ctf-writer/object.h (98%) rename {ctf-writer => src/ctf-writer}/resolve.c (99%) rename include/babeltrace2/ctf-writer/resolve-internal.h => src/ctf-writer/resolve.h (94%) rename {ctf-writer => src/ctf-writer}/stream-class.c (97%) rename include/babeltrace2/ctf-writer/stream-class-internal.h => src/ctf-writer/stream-class.h (97%) rename {ctf-writer => src/ctf-writer}/stream.c (98%) rename include/babeltrace2/ctf-writer/stream-internal.h => src/ctf-writer/stream.h (90%) rename {ctf-writer => src/ctf-writer}/trace.c (98%) rename include/babeltrace2/ctf-writer/trace-internal.h => src/ctf-writer/trace.h (95%) rename {ctf-writer => src/ctf-writer}/utils.c (95%) rename include/babeltrace2/ctf-writer/utils-internal.h => src/ctf-writer/utils.h (98%) rename {ctf-writer => src/ctf-writer}/validation.c (97%) rename include/babeltrace2/ctf-writer/validation-internal.h => src/ctf-writer/validation.h (98%) rename {ctf-writer => src/ctf-writer}/values.c (98%) rename include/babeltrace2/ctf-writer/values-internal.h => src/ctf-writer/values.h (99%) rename {ctf-writer => src/ctf-writer}/visitor.c (97%) rename include/babeltrace2/ctf-writer/visitor-internal.h => src/ctf-writer/visitor.h (97%) rename {ctf-writer => src/ctf-writer}/writer.c (94%) rename include/babeltrace2/ctf-writer/writer-internal.h => src/ctf-writer/writer.h (95%) rename {ctfser => src/ctfser}/Makefile.am (52%) rename {ctfser => src/ctfser}/ctfser.c (96%) rename include/babeltrace2/ctfser-internal.h => src/ctfser/ctfser.h (97%) rename {ctfser => src/ctfser}/logging.c (96%) rename {ctfser => src/ctfser}/logging.h (96%) rename {fd-cache => src/fd-cache}/Makefile.am (92%) rename {fd-cache => src/fd-cache}/fd-cache.c (98%) rename include/babeltrace2/fd-cache-internal.h => src/fd-cache/fd-cache.h (96%) rename {fd-cache => src/fd-cache}/logging.c (96%) rename {fd-cache => src/fd-cache}/logging.h (96%) create mode 100644 src/lib/Makefile.am rename include/babeltrace2/assert-pre-internal.h => src/lib/assert-pre.h (90%) rename {lib => src/lib}/babeltrace2.c (100%) rename {lib => src/lib}/graph/Makefile.am (61%) rename {lib => src/lib}/graph/component-class-sink-colander.c (96%) rename include/babeltrace2/graph/component-class-sink-colander-internal.h => src/lib/graph/component-class-sink-colander.h (100%) rename {lib => src/lib}/graph/component-class.c (99%) rename include/babeltrace2/graph/component-class-internal.h => src/lib/graph/component-class.h (97%) rename {lib => src/lib}/graph/component-filter.c (94%) rename include/babeltrace2/graph/component-filter-internal.h => src/lib/graph/component-filter.h (91%) rename {lib => src/lib}/graph/component-sink.c (94%) rename include/babeltrace2/graph/component-sink-internal.h => src/lib/graph/component-sink.h (89%) rename {lib => src/lib}/graph/component-source.c (91%) rename include/babeltrace2/graph/component-source-internal.h => src/lib/graph/component-source.h (91%) rename {lib => src/lib}/graph/component.c (96%) rename include/babeltrace2/graph/component-internal.h => src/lib/graph/component.h (95%) rename {lib => src/lib}/graph/connection.c (94%) rename include/babeltrace2/graph/connection-internal.h => src/lib/graph/connection.h (95%) rename {lib => src/lib}/graph/graph.c (98%) rename include/babeltrace2/graph/graph-internal.h => src/lib/graph/graph.h (96%) rename {lib => src/lib}/graph/iterator.c (97%) rename {lib => src/lib}/graph/message/Makefile.am (53%) rename {lib => src/lib}/graph/message/discarded-items.c (96%) rename include/babeltrace2/graph/message-discarded-items-internal.h => src/lib/graph/message/discarded-items.h (91%) rename {lib => src/lib}/graph/message/event.c (94%) rename include/babeltrace2/graph/message-event-internal.h => src/lib/graph/message/event.h (93%) rename include/babeltrace2/graph/message-iterator-internal.h => src/lib/graph/message/iterator.h (98%) rename {lib => src/lib}/graph/message/message-iterator-inactivity.c (90%) rename include/babeltrace2/graph/message-message-iterator-inactivity-internal.h => src/lib/graph/message/message-iterator-inactivity.h (96%) rename {lib => src/lib}/graph/message/message.c (90%) rename include/babeltrace2/graph/message-internal.h => src/lib/graph/message/message.h (95%) rename {lib => src/lib}/graph/message/packet.c (95%) rename include/babeltrace2/graph/message-packet-internal.h => src/lib/graph/message/packet.h (91%) rename {lib => src/lib}/graph/message/stream-activity.c (95%) rename include/babeltrace2/graph/message-stream-activity-internal.h => src/lib/graph/message/stream-activity.h (95%) rename {lib => src/lib}/graph/message/stream.c (93%) rename include/babeltrace2/graph/message-stream-internal.h => src/lib/graph/message/stream.h (85%) rename {lib => src/lib}/graph/port.c (93%) rename include/babeltrace2/graph/port-internal.h => src/lib/graph/port.h (100%) rename {lib => src/lib}/graph/query-executor.c (93%) rename include/babeltrace2/graph/query-executor-internal.h => src/lib/graph/query-executor.h (98%) rename {lib => src/lib}/lib-logging.c (94%) rename include/babeltrace2/lib-logging-internal.h => src/lib/lib-logging.h (98%) rename {lib => src/lib}/logging.c (98%) rename {lib => src/lib}/object-pool.c (92%) rename include/babeltrace2/object-pool-internal.h => src/lib/object-pool.h (99%) rename include/babeltrace2/object-internal.h => src/lib/object.h (99%) rename {lib => src/lib}/plugin/Makefile.am (70%) rename {lib => src/lib}/plugin/plugin-so.c (99%) rename include/babeltrace2/plugin/plugin-so-internal.h => src/lib/plugin/plugin-so.h (100%) rename {lib => src/lib}/plugin/plugin.c (97%) rename include/babeltrace2/plugin/plugin-internal.h => src/lib/plugin/plugin.h (97%) create mode 100644 src/lib/prio-heap/Makefile.am rename lib/prio_heap/prio_heap.c => src/lib/prio-heap/prio-heap.c (97%) rename include/babeltrace2/prio-heap-internal.h => src/lib/prio-heap/prio-heap.h (98%) rename include/babeltrace2/property-internal.h => src/lib/property.h (97%) rename {lib => src/lib}/trace-ir/Makefile.am (56%) rename {lib => src/lib}/trace-ir/attributes.c (96%) rename include/babeltrace2/trace-ir/attributes-internal.h => src/lib/trace-ir/attributes.h (97%) rename {lib => src/lib}/trace-ir/clock-class.c (95%) rename include/babeltrace2/trace-ir/clock-class-internal.h => src/lib/trace-ir/clock-class.h (91%) rename include/babeltrace2/trace-ir/clock-snapshot-set-internal.h => src/lib/trace-ir/clock-snapshot-set.h (96%) rename {lib => src/lib}/trace-ir/clock-snapshot.c (92%) rename include/babeltrace2/trace-ir/clock-snapshot-internal.h => src/lib/trace-ir/clock-snapshot.h (93%) rename {lib => src/lib}/trace-ir/event-class.c (93%) rename include/babeltrace2/trace-ir/event-class-internal.h => src/lib/trace-ir/event-class.h (89%) rename {lib => src/lib}/trace-ir/event.c (90%) rename include/babeltrace2/trace-ir/event-internal.h => src/lib/trace-ir/event.h (91%) rename {lib => src/lib}/trace-ir/field-class.c (98%) rename include/babeltrace2/trace-ir/field-class-internal.h => src/lib/trace-ir/field-class.h (98%) rename {lib => src/lib}/trace-ir/field-path.c (94%) rename include/babeltrace2/trace-ir/field-path-internal.h => src/lib/trace-ir/field-path.h (97%) rename {lib => src/lib}/trace-ir/field-wrapper.c (92%) rename include/babeltrace2/trace-ir/field-wrapper-internal.h => src/lib/trace-ir/field-wrapper.h (92%) rename {lib => src/lib}/trace-ir/field.c (98%) rename include/babeltrace2/trace-ir/field-internal.h => src/lib/trace-ir/field.h (95%) rename {lib => src/lib}/trace-ir/packet-context-field.c (92%) rename {lib => src/lib}/trace-ir/packet.c (94%) rename include/babeltrace2/trace-ir/packet-internal.h => src/lib/trace-ir/packet.h (90%) rename {lib => src/lib}/trace-ir/resolve-field-path.c (97%) rename include/babeltrace2/trace-ir/resolve-field-path-internal.h => src/lib/trace-ir/resolve-field-path.h (97%) rename {lib => src/lib}/trace-ir/stream-class.c (95%) rename include/babeltrace2/trace-ir/stream-class-internal.h => src/lib/trace-ir/stream-class.h (89%) rename {lib => src/lib}/trace-ir/stream.c (93%) rename include/babeltrace2/trace-ir/stream-internal.h => src/lib/trace-ir/stream.h (92%) rename {lib => src/lib}/trace-ir/trace-class.c (93%) rename include/babeltrace2/trace-ir/trace-class-internal.h => src/lib/trace-ir/trace-class.h (85%) rename {lib => src/lib}/trace-ir/trace.c (90%) rename include/babeltrace2/trace-ir/trace-internal.h => src/lib/trace-ir/trace.h (84%) rename {lib => src/lib}/trace-ir/utils.c (90%) rename include/babeltrace2/trace-ir/utils-internal.h => src/lib/trace-ir/utils.h (97%) rename {lib => src/lib}/util.c (94%) rename {lib => src/lib}/value.c (99%) rename include/babeltrace2/value-internal.h => src/lib/value.h (98%) rename {logging => src/logging}/LICENSE (100%) rename {logging => src/logging}/Makefile.am (50%) rename {logging => src/logging}/log.c (99%) rename include/babeltrace2/logging-internal.h => src/logging/log.h (98%) rename {plugins => src/plugins}/Makefile.am (100%) rename {plugins => src/plugins}/ctf/Makefile.am (73%) rename {plugins => src/plugins}/ctf/common/Makefile.am (100%) rename {plugins => src/plugins}/ctf/common/bfcr/Makefile.am (100%) rename {plugins => src/plugins}/ctf/common/bfcr/bfcr.c (99%) rename {plugins => src/plugins}/ctf/common/bfcr/bfcr.h (99%) rename {plugins => src/plugins}/ctf/common/bfcr/btr.gdb (100%) rename {plugins => src/plugins}/ctf/common/bfcr/logging.c (96%) rename {plugins => src/plugins}/ctf/common/bfcr/logging.h (96%) rename {plugins => src/plugins}/ctf/common/metadata/Makefile.am (100%) rename {plugins => src/plugins}/ctf/common/metadata/ast.h (99%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-resolve.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-translate.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-default-clock-classes.c (98%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-in-ir.c (97%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-meanings.c (98%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-stream-class-config.c (96%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-text-array-sequence.c (97%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c (98%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-validate.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-visitors.h (97%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c (97%) rename {plugins => src/plugins}/ctf/common/metadata/ctf-meta.h (99%) rename {plugins => src/plugins}/ctf/common/metadata/decoder.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/decoder.h (100%) rename {plugins => src/plugins}/ctf/common/metadata/lexer.l (100%) rename {plugins => src/plugins}/ctf/common/metadata/logging.c (96%) rename {plugins => src/plugins}/ctf/common/metadata/logging.h (97%) rename {plugins => src/plugins}/ctf/common/metadata/objstack.c (96%) rename {plugins => src/plugins}/ctf/common/metadata/objstack.h (100%) rename {plugins => src/plugins}/ctf/common/metadata/parser.y (99%) rename {plugins => src/plugins}/ctf/common/metadata/scanner-symbols.h (100%) rename {plugins => src/plugins}/ctf/common/metadata/scanner.h (100%) rename {plugins => src/plugins}/ctf/common/metadata/visitor-generate-ir.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/visitor-parent-links.c (99%) rename {plugins => src/plugins}/ctf/common/metadata/visitor-semantic-validator.c (99%) rename {plugins => src/plugins}/ctf/common/msg-iter/Makefile.am (100%) rename {plugins => src/plugins}/ctf/common/msg-iter/logging.c (96%) rename {plugins => src/plugins}/ctf/common/msg-iter/logging.h (96%) rename {plugins => src/plugins}/ctf/common/msg-iter/msg-iter.c (99%) rename {plugins => src/plugins}/ctf/common/msg-iter/msg-iter.h (99%) rename {plugins => src/plugins}/ctf/common/print.h (97%) rename {plugins => src/plugins}/ctf/common/utils/Makefile.am (100%) rename {plugins => src/plugins}/ctf/common/utils/logging.c (96%) rename {plugins => src/plugins}/ctf/common/utils/logging.h (96%) rename {plugins => src/plugins}/ctf/common/utils/utils.c (100%) rename {plugins => src/plugins}/ctf/common/utils/utils.h (96%) rename {plugins => src/plugins}/ctf/fs-sink/Makefile.am (100%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink-ctf-meta.h (99%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink-stream.c (99%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink-stream.h (98%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink-trace.c (99%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink-trace.h (96%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink.c (99%) rename {plugins => src/plugins}/ctf/fs-sink/fs-sink.h (98%) rename {plugins => src/plugins}/ctf/fs-sink/logging.c (96%) rename {plugins => src/plugins}/ctf/fs-sink/logging.h (97%) rename {plugins => src/plugins}/ctf/fs-sink/translate-ctf-ir-to-tsdl.c (99%) rename {plugins => src/plugins}/ctf/fs-sink/translate-ctf-ir-to-tsdl.h (100%) rename {plugins => src/plugins}/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c (99%) rename {plugins => src/plugins}/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h (97%) rename {plugins => src/plugins}/ctf/fs-src/Makefile.am (87%) rename {plugins => src/plugins}/ctf/fs-src/data-stream-file.c (99%) rename {plugins => src/plugins}/ctf/fs-src/data-stream-file.h (98%) rename {plugins => src/plugins}/ctf/fs-src/file.c (100%) rename {plugins => src/plugins}/ctf/fs-src/file.h (97%) rename {plugins => src/plugins}/ctf/fs-src/fs.c (99%) rename {plugins => src/plugins}/ctf/fs-src/fs.h (99%) rename {plugins => src/plugins}/ctf/fs-src/logging.c (96%) rename {plugins => src/plugins}/ctf/fs-src/logging.h (96%) rename {plugins => src/plugins}/ctf/fs-src/lttng-index.h (98%) rename {plugins => src/plugins}/ctf/fs-src/metadata.c (96%) rename {plugins => src/plugins}/ctf/fs-src/metadata.h (97%) rename {plugins => src/plugins}/ctf/fs-src/query.c (99%) rename {plugins => src/plugins}/ctf/fs-src/query.h (97%) rename {plugins => src/plugins}/ctf/lttng-live/Makefile.am (91%) rename {plugins => src/plugins}/ctf/lttng-live/data-stream.c (98%) rename {plugins => src/plugins}/ctf/lttng-live/data-stream.h (97%) rename {plugins => src/plugins}/ctf/lttng-live/logging.c (96%) rename {plugins => src/plugins}/ctf/lttng-live/logging.h (96%) rename {plugins => src/plugins}/ctf/lttng-live/lttng-live.c (99%) rename {plugins => src/plugins}/ctf/lttng-live/lttng-live.h (99%) rename {plugins => src/plugins}/ctf/lttng-live/lttng-viewer-abi.h (99%) rename {plugins => src/plugins}/ctf/lttng-live/metadata.c (99%) rename {plugins => src/plugins}/ctf/lttng-live/metadata.h (97%) rename {plugins => src/plugins}/ctf/lttng-live/viewer-connection.c (99%) rename {plugins => src/plugins}/ctf/lttng-live/viewer-connection.h (95%) rename {plugins => src/plugins}/ctf/plugin.c (100%) rename {plugins => src/plugins}/ctf/print.h (100%) rename {plugins => src/plugins}/lttng-utils/Makefile.am (73%) rename {plugins => src/plugins}/lttng-utils/debug-info/Makefile.am (83%) rename {plugins => src/plugins}/lttng-utils/debug-info/bin-info.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/bin-info.h (98%) rename {plugins => src/plugins}/lttng-utils/debug-info/crc32.c (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/crc32.h (98%) rename {plugins => src/plugins}/lttng-utils/debug-info/debug-info.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/debug-info.h (98%) rename {plugins => src/plugins}/lttng-utils/debug-info/dwarf.c (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/dwarf.h (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/logging.c (96%) rename {plugins => src/plugins}/lttng-utils/debug-info/logging.h (97%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-data-copy.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-data-copy.h (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-mapping.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-mapping.h (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-metadata-copy.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-metadata-copy.h (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c (99%) rename {plugins => src/plugins}/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/utils.c (100%) rename {plugins => src/plugins}/lttng-utils/debug-info/utils.h (97%) rename {plugins => src/plugins}/lttng-utils/plugin.c (100%) rename {plugins => src/plugins}/plugins-common.h (100%) rename {plugins => src/plugins}/text/Makefile.am (66%) rename {plugins => src/plugins}/text/dmesg/Makefile.am (81%) rename {plugins => src/plugins}/text/dmesg/dmesg.c (99%) rename {plugins => src/plugins}/text/dmesg/dmesg.h (98%) rename {plugins => src/plugins}/text/dmesg/logging.c (96%) rename {plugins => src/plugins}/text/dmesg/logging.h (97%) rename {plugins => src/plugins}/text/plugin.c (100%) rename {plugins => src/plugins}/text/pretty/Makefile.am (82%) rename {plugins => src/plugins}/text/pretty/logging.c (96%) rename {plugins => src/plugins}/text/pretty/logging.h (97%) rename {plugins => src/plugins}/text/pretty/pretty.c (99%) rename {plugins => src/plugins}/text/pretty/pretty.h (98%) rename {plugins => src/plugins}/text/pretty/print.c (99%) rename {plugins => src/plugins}/utils/Makefile.am (68%) rename {plugins => src/plugins}/utils/counter/Makefile.am (79%) rename {plugins => src/plugins}/utils/counter/counter.c (98%) rename {plugins => src/plugins}/utils/counter/counter.h (100%) rename {plugins => src/plugins}/utils/counter/logging.c (96%) create mode 100644 src/plugins/utils/counter/logging.h rename {plugins => src/plugins}/utils/dummy/Makefile.am (74%) rename {plugins => src/plugins}/utils/dummy/dummy.c (97%) rename {plugins => src/plugins}/utils/dummy/dummy.h (97%) rename {plugins => src/plugins}/utils/muxer/Makefile.am (76%) rename {plugins => src/plugins}/utils/muxer/logging.c (96%) rename {plugins/utils/counter => src/plugins/utils/muxer}/logging.h (97%) rename {plugins => src/plugins}/utils/muxer/muxer.c (99%) rename {plugins => src/plugins}/utils/muxer/muxer.h (98%) rename {plugins => src/plugins}/utils/plugin.c (100%) rename {plugins => src/plugins}/utils/trimmer/Makefile.am (63%) rename {plugins => src/plugins}/utils/trimmer/logging.c (96%) rename {plugins => src/plugins}/utils/trimmer/logging.h (97%) rename {plugins => src/plugins}/utils/trimmer/trimmer.c (99%) rename {plugins => src/plugins}/utils/trimmer/trimmer.h (97%) rename {python-plugin-provider => src/python-plugin-provider}/Makefile.am (73%) rename {python-plugin-provider => src/python-plugin-provider}/python-plugin-provider.c (98%) rename include/babeltrace2/plugin/python-plugin-provider-internal.h => src/python-plugin-provider/python-plugin-provider.h (100%) diff --git a/.gitignore b/.gitignore index 9c71bb9d..b460d111 100644 --- a/.gitignore +++ b/.gitignore @@ -58,18 +58,18 @@ ctf-lexer.c ctf-parser.c ctf-parser.h ctf-parser-test -plugins/ctf/common/metadata/lexer.c -plugins/ctf/common/metadata/parser.c -plugins/ctf/common/metadata/parser.h -plugins/ctf/common/metadata/parser.output -/cli/babeltrace2 -/cli/babeltrace2.bin -/cli/babeltrace2-log -/cli/babeltrace2-log.bin -/include/config.h -/include/config.h.in -/include/version.i -/include/version.i.tmp +/src/plugins/ctf/common/metadata/lexer.c +/src/plugins/ctf/common/metadata/parser.c +/src/plugins/ctf/common/metadata/parser.h +/src/plugins/ctf/common/metadata/parser.output +/src/cli/babeltrace2 +/src/cli/babeltrace2.bin +/src/cli/babeltrace2-log +/src/cli/babeltrace2-log.bin +/src/common/config.h +/src/common/config.h.in +/src/common/version.i +/src/common/version.i.tmp /config.status *.log aclocal.m4 @@ -87,8 +87,8 @@ config/ core stamp-h1 __pycache__ -/babeltrace2.pc -/babeltrace2-ctf-writer.pc +/src/babeltrace2.pc +/src/babeltrace2-ctf-writer.pc TAGS cscope* doc/api/Doxyfile diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 32fd7963..3489e0e1 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -284,18 +284,18 @@ The logging API headers are: Public header which a library user can use to control and read libbabeltrace2's current log level. -``:: +``:: Internal, generic logging API which you can use in any Babeltrace subproject. This is the translation of `zf_log.h`. -``:: +``:: Specific internal header to use within the library. This header defines `BT_LOG_OUTPUT_LEVEL` to a custom, library-wide hidden symbol which is the library's current log level before including - ``. + ``. -Do not include `` or -`` in a header which contains logging +Do not include `` or +`` in a header which contains logging statements: this header could be included in source files which define a different <>, for example. See <>. @@ -355,10 +355,10 @@ get the configured minimal log level. `_bt_log_global_output_lvl` symbol. In practice, we never use this symbol, and always make sure that `BT_LOG_OUTPUT_LEVEL` is defined to a module-wise or subproject-wise hidden symbol before including -``. In the library, -`` does this job: just include this +``. In the library, +`` does this job: just include this header which defines `BT_LOG_OUTPUT_LEVEL` to the appropriate symbol -before it includes ``. In plugins, for +before it includes ``. In plugins, for example, there is one log level per component class, which makes log filtering easier during execution. + @@ -593,7 +593,7 @@ Follow those steps to make your module loggable: */ #define BT_LOG_OUTPUT_LEVEL my_module_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(my_module_log_level, "BABELTRACE_MY_MODULE_LOG_LEVEL"); ---- @@ -639,7 +639,7 @@ the environment variable and sets the log level symbol accordingly. */ #define BT_LOG_OUTPUT_LEVEL my_module_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(my_module_log_level); diff --git a/LICENSE b/LICENSE index 76475d5f..dae5d84d 100644 --- a/LICENSE +++ b/LICENSE @@ -16,7 +16,7 @@ per-file license. See gpl-2.0.txt for details. * LGPLv2.1 -The file include/babeltrace/list-internal.h is licensed under LGPLv2.1. It only +The file src/bt-list.h is licensed under LGPLv2.1. It only contains trivial static inline functions and macros, and, therefore, including it does not make babeltrace a derivative work on this header. Please refer to the LGPLv2.1 license for details. diff --git a/Makefile.am b/Makefile.am index 938dc75b..745ff31e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,18 +1,9 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include \ - common \ - ctfser \ - fd-cache \ - compat \ - logging \ - lib \ - python-plugin-provider \ - ctf-writer \ - plugins \ - cli \ - bindings \ - doc \ +SUBDIRS = \ + include \ + src \ + doc \ tests # Directories added to EXTRA_DIST will be recursively copied to the distribution. @@ -24,9 +15,6 @@ dist_doc_DATA = ChangeLog LICENSE mit-license.txt gpl-2.0.txt \ dist_noinst_DATA = CodingStyle -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = babeltrace2.pc babeltrace2-ctf-writer.pc - # This is a convenience target, it's not part of the build process. CONTRIBUTING.html: CONTRIBUTING.adoc $(ASCIIDOC) --verbose -a source-highlighter=pygments $< diff --git a/common/Makefile.am b/common/Makefile.am deleted file mode 100644 index 75247fcd..00000000 --- a/common/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -AM_CPPFLAGS += -DINSTALL_LIBDIR=\"$(libdir)\" - - -noinst_LTLIBRARIES = libbabeltrace2-common.la - -libbabeltrace2_common_la_SOURCES = assert.c common.c logging.c logging.h diff --git a/compat/Makefile.am b/compat/Makefile.am deleted file mode 100644 index 91a34842..00000000 --- a/compat/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -noinst_LTLIBRARIES = libcompat.la - -libcompat_la_SOURCES = compat_uuid.c \ - compat_mman.c \ - logging.c logging.h - -libcompat_la_LDFLAGS = \ - $(LD_NO_AS_NEEDED) - -if BABELTRACE_BUILD_WITH_MINGW -libcompat_la_LDFLAGS += -lrpcrt4 -endif diff --git a/configure.ac b/configure.ac index b4f1e915..449df8d2 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,7 @@ m4_define([bt_lib_version], bt_lib_version_current[:]bt_lib_version_revision[:]b AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_lib_version) -AC_CONFIG_HEADERS([include/config.h]) +AC_CONFIG_HEADERS([src/common/config.h]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([m4]) AC_REQUIRE_AUX_FILE([tap-driver.sh]) @@ -684,7 +684,7 @@ AM_CFLAGS="-Wall -Wformat -Werror=implicit-function-declaration $PTHREAD_CFLAGS AC_SUBST(AM_CFLAGS) # Set global CPPFLAGS in AM_CPPFLAGS -AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -include config.h" +AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/src -I\$(top_srcdir)/src -include common/config.h" AC_SUBST(AM_CPPFLAGS) # Add glib to global link libs @@ -725,64 +725,65 @@ program_transform_name="s&babeltrace2\.bin&babeltrace2&;s&babeltrace2-log\.bin&b AC_SUBST(program_transform_name) AC_CONFIG_FILES([ - Makefile - bindings/python/Makefile - bindings/python/bt2/Makefile - bindings/python/bt2/setup.py - bindings/python/bt2/bt2/__init__.py - common/Makefile - ctfser/Makefile - ctf-writer/Makefile - compat/Makefile - cli/Makefile - doc/Makefile - doc/api/Makefile doc/api/Doxyfile + doc/api/Makefile doc/bindings/Makefile doc/bindings/python/Makefile doc/contributing-images/Makefile - doc/man/Makefile - doc/man/asciidoc-attrs.conf - fd-cache/Makefile - lib/Makefile - lib/prio_heap/Makefile - lib/plugin/Makefile - lib/graph/Makefile - lib/graph/message/Makefile - lib/trace-ir/Makefile + doc/Makefile + doc/man/asciidoc-attrs.conf + doc/man/Makefile include/Makefile - logging/Makefile - bindings/Makefile - tests/Makefile + Makefile + src/babeltrace2-ctf-writer.pc + src/babeltrace2.pc + src/bindings/Makefile + src/bindings/python/bt2/bt2/__init__.py + src/bindings/python/bt2/Makefile + src/bindings/python/bt2/setup.py + src/bindings/python/Makefile + src/cli/Makefile + src/common/Makefile + src/compat/Makefile + src/ctfser/Makefile + src/ctf-writer/Makefile + src/fd-cache/Makefile + src/lib/graph/Makefile + src/lib/graph/message/Makefile + src/lib/Makefile + src/lib/plugin/Makefile + src/lib/prio-heap/Makefile + src/lib/trace-ir/Makefile + src/logging/Makefile + src/Makefile + src/plugins/ctf/common/bfcr/Makefile + src/plugins/ctf/common/Makefile + src/plugins/ctf/common/metadata/Makefile + src/plugins/ctf/common/msg-iter/Makefile + src/plugins/ctf/common/utils/Makefile + src/plugins/ctf/fs-sink/Makefile + src/plugins/ctf/fs-src/Makefile + src/plugins/ctf/lttng-live/Makefile + src/plugins/ctf/Makefile + src/plugins/lttng-utils/debug-info/Makefile + src/plugins/lttng-utils/Makefile + src/plugins/Makefile + src/plugins/text/dmesg/Makefile + src/plugins/text/Makefile + src/plugins/text/pretty/Makefile + src/plugins/utils/counter/Makefile + src/plugins/utils/dummy/Makefile + src/plugins/utils/Makefile + src/plugins/utils/muxer/Makefile + src/plugins/utils/trimmer/Makefile + src/python-plugin-provider/Makefile tests/lib/Makefile tests/lib/test-plugin-plugins/Makefile + tests/Makefile + tests/plugins/Makefile tests/utils/common.sh tests/utils/Makefile tests/utils/tap/Makefile - tests/plugins/Makefile - plugins/Makefile - plugins/ctf/Makefile - plugins/ctf/common/Makefile - plugins/ctf/common/bfcr/Makefile - plugins/ctf/common/metadata/Makefile - plugins/ctf/common/msg-iter/Makefile - plugins/ctf/common/utils/Makefile - plugins/ctf/fs-src/Makefile - plugins/ctf/fs-sink/Makefile - plugins/ctf/lttng-live/Makefile - plugins/text/Makefile - plugins/text/dmesg/Makefile - plugins/text/pretty/Makefile - plugins/utils/Makefile - plugins/utils/dummy/Makefile - plugins/utils/counter/Makefile - plugins/utils/trimmer/Makefile - plugins/utils/muxer/Makefile - python-plugin-provider/Makefile - plugins/lttng-utils/Makefile - plugins/lttng-utils/debug-info/Makefile - babeltrace2.pc - babeltrace2-ctf-writer.pc ]) AC_CONFIG_FILES([tests/cli/test_intersection], [chmod +x tests/cli/test_intersection]) diff --git a/doc/api/Doxyfile.in b/doc/api/Doxyfile.in index 9715ca6b..376888ce 100644 --- a/doc/api/Doxyfile.in +++ b/doc/api/Doxyfile.in @@ -164,7 +164,7 @@ FILE_PATTERNS = *.h \ RECURSIVE = NO EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = *-internal.h +EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * diff --git a/doc/bindings/python/Makefile.am b/doc/bindings/python/Makefile.am index aa94c271..71252a02 100644 --- a/doc/bindings/python/Makefile.am +++ b/doc/bindings/python/Makefile.am @@ -9,9 +9,9 @@ EXTRA_DIST = $(srcdir)/source all-local: $(SPHINX_HTML_TARGET) $(SPHINX_DIRHTML_TARGET) -PYTHON_BT2_BUILD_LIB_DIR = $(abs_top_builddir)/bindings/python/bt2/build/build_lib +PYTHON_BT2_BUILD_LIB_DIR = $(abs_top_builddir)/src/bindings/python/bt2/build/build_lib PP = $(PYTHON_BT2_BUILD_LIB_DIR) -LLP = $(abs_top_builddir)/lib/.libs +LLP = $(abs_top_builddir)/src/lib/.libs SPHINXBUILD = PYTHONPATH="$(PP)" LD_LIBRARY_PATH="$(LLP)" $(PYTHON) -m sphinx SPHINX_SRC = $(wildcard $(SPHINX_SOURCE_DIR)/*.rst) diff --git a/include/Makefile.am b/include/Makefile.am index a340b805..9b4f0530 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,73 +1,3 @@ -## -## This target generates an include file that contains the git version -## string of the current branch, it must be continuously updated when -## we build in the git repo and shipped in dist tarballs to reflect the -## status of the tree when it was generated. If the tree is clean and -## the current commit is tag a starting with "v", consider this a -## release version and set an empty git version. -## -## Here is what the inline script does: -## -## First, delete any stale "version.i.tmp" file. -## -## If "bootstrap" and ".git" exists in the top source directory and the git -## executable is available, get the current git version string in the form: -## -## "latest_tag"(-"number_of_commits_on_top")(-g"latest_commit_hash")(-dirty) -## -## And store it in "version.i.tmp", if the current commit is tagged, the tag -## starts with "v" and the tree is clean, consider this a release version and -## overwrite the git version with an empty string in "version.i.tmp". -## -## If we don't have a "version.i.tmp" nor a "version.i", generate an empty -## string as a failover. -## -## If we don't have a "version.i" or we have both files and they are different, -## copy "version.i.tmp" over "version.i". This way the dependent targets are -## only rebuilt when the version string changes. -## - -version_verbose = $(version_verbose_@AM_V@) -version_verbose_ = $(version_verbose_@AM_DEFAULT_V@) -version_verbose_0 = @echo " GEN " $@; - -version.i: - $(version_verbose)rm -f version.i.tmp; \ - if (test -r "$(top_srcdir)/bootstrap" && test -r "$(top_srcdir)/.git") && \ - test -x "`which git 2>&1;true`"; then \ - GIT_VERSION_STR="`cd "$(top_srcdir)" && git describe --tags --dirty`"; \ - GIT_CURRENT_TAG="`cd "$(top_srcdir)" && git describe --tags --exact-match --match="v[0-9]*" HEAD 2> /dev/null`"; \ - echo "#define GIT_VERSION \"$$GIT_VERSION_STR\"" > version.i.tmp; \ - if ! $(GREP) -- "-dirty" version.i.tmp > /dev/null && \ - test "x$$GIT_CURRENT_TAG" != "x"; then \ - echo "#define GIT_VERSION \"\"" > version.i.tmp; \ - fi; \ - fi; \ - if test ! -f version.i.tmp; then \ - if test ! -f version.i; then \ - echo '#define GIT_VERSION ""' > version.i; \ - fi; \ - elif test ! -f version.i || \ - test x"`cat version.i.tmp`" != x"`cat version.i`"; then \ - mv version.i.tmp version.i; \ - fi; \ - rm -f version.i.tmp; \ - true - -## -## version.i is defined as a .PHONY target even if it's a real file, -## we want the target to be re-run on every make. -## -.PHONY: version.i - -CLEANFILES = version.i.tmp - -## -## Only clean "version.i" on dist-clean, we need to keep it on regular -## clean when it's part of a dist tarball. -## -DISTCLEANFILES = version.i - # Core API babeltrace2includedir = "$(includedir)/babeltrace2" babeltrace2include_HEADERS = \ @@ -210,99 +140,3 @@ babeltrace2graphinclude_HEADERS = \ babeltrace2/graph/self-component-source.h \ babeltrace2/graph/self-component.h \ babeltrace2/graph/self-message-iterator.h - -noinst_HEADERS = \ - babeltrace2/compat/stdlib-internal.h \ - babeltrace2/compat/fcntl-internal.h \ - babeltrace2/compat/glib-internal.h \ - babeltrace2/compat/uuid-internal.h \ - babeltrace2/compat/unistd-internal.h \ - babeltrace2/compat/stdio-internal.h \ - babeltrace2/compat/time-internal.h \ - babeltrace2/compat/utc-internal.h \ - babeltrace2/compat/memstream-internal.h \ - babeltrace2/compat/string-internal.h \ - babeltrace2/compat/limits-internal.h \ - babeltrace2/compat/mman-internal.h \ - babeltrace2/compat/socket-internal.h \ - babeltrace2/common-internal.h \ - babeltrace2/ctfser-internal.h \ - babeltrace2/bitfield-internal.h \ - babeltrace2/object-internal.h \ - babeltrace2/object-pool-internal.h \ - babeltrace2/plugin/plugin-internal.h \ - babeltrace2/plugin/plugin-so-internal.h \ - babeltrace2/plugin/python-plugin-provider-internal.h \ - babeltrace2/assert-internal.h \ - babeltrace2/value-internal.h \ - babeltrace2/ctf-writer/assert-pre-internal.h \ - babeltrace2/ctf-writer/attributes-internal.h \ - babeltrace2/ctf-writer/clock-class-internal.h \ - babeltrace2/ctf-writer/clock-internal.h \ - babeltrace2/ctf-writer/event-class-internal.h \ - babeltrace2/ctf-writer/event-internal.h \ - babeltrace2/ctf-writer/field-path-internal.h \ - babeltrace2/ctf-writer/fields-internal.h \ - babeltrace2/ctf-writer/field-types-internal.h \ - babeltrace2/ctf-writer/field-wrapper-internal.h \ - babeltrace2/ctf-writer/functor-internal.h \ - babeltrace2/ctf-writer/object-internal.h \ - babeltrace2/ctf-writer/object-pool-internal.h \ - babeltrace2/ctf-writer/resolve-internal.h \ - babeltrace2/ctf-writer/stream-class-internal.h \ - babeltrace2/ctf-writer/stream-internal.h \ - babeltrace2/ctf-writer/trace-internal.h \ - babeltrace2/ctf-writer/utils-internal.h \ - babeltrace2/ctf-writer/validation-internal.h \ - babeltrace2/ctf-writer/values-internal.h \ - babeltrace2/ctf-writer/visitor-internal.h \ - babeltrace2/ctf-writer/writer-internal.h \ - babeltrace2/mmap-align-internal.h \ - babeltrace2/align-internal.h \ - babeltrace2/logging-internal.h \ - babeltrace2/endian-internal.h \ - babeltrace2/trace-ir/attributes-internal.h \ - babeltrace2/trace-ir/clock-class-internal.h \ - babeltrace2/trace-ir/clock-snapshot-internal.h \ - babeltrace2/trace-ir/clock-snapshot-set-internal.h \ - babeltrace2/trace-ir/event-class-internal.h \ - babeltrace2/trace-ir/event-internal.h \ - babeltrace2/trace-ir/field-class-internal.h \ - babeltrace2/trace-ir/field-path-internal.h \ - babeltrace2/trace-ir/field-internal.h \ - babeltrace2/trace-ir/field-wrapper-internal.h \ - babeltrace2/trace-ir/packet-internal.h \ - babeltrace2/trace-ir/resolve-field-path-internal.h \ - babeltrace2/trace-ir/stream-class-internal.h \ - babeltrace2/trace-ir/stream-internal.h \ - babeltrace2/trace-ir/trace-class-internal.h \ - babeltrace2/trace-ir/trace-internal.h \ - babeltrace2/trace-ir/utils-internal.h \ - babeltrace2/prio-heap-internal.h \ - babeltrace2/lib-logging-internal.h \ - babeltrace2/compiler-internal.h \ - babeltrace2/babeltrace-internal.h \ - babeltrace2/assert-pre-internal.h \ - babeltrace2/graph/component-class-internal.h \ - babeltrace2/graph/component-class-sink-colander-internal.h \ - babeltrace2/graph/component-filter-internal.h \ - babeltrace2/graph/component-internal.h \ - babeltrace2/graph/component-sink-internal.h \ - babeltrace2/graph/component-source-internal.h \ - babeltrace2/graph/connection-internal.h \ - babeltrace2/graph/graph-internal.h \ - babeltrace2/graph/message-discarded-items-internal.h \ - babeltrace2/graph/message-event-internal.h \ - babeltrace2/graph/message-message-iterator-inactivity-internal.h \ - babeltrace2/graph/message-internal.h \ - babeltrace2/graph/message-iterator-internal.h \ - babeltrace2/graph/message-packet-internal.h \ - babeltrace2/graph/message-stream-activity-internal.h \ - babeltrace2/graph/message-stream-internal.h \ - babeltrace2/graph/port-internal.h \ - babeltrace2/graph/query-executor-internal.h \ - babeltrace2/list-internal.h \ - babeltrace2/fd-cache-internal.h \ - babeltrace2/property-internal.h \ - version.h \ - version.i diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 39b956a9..00000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -SUBDIRS = trace-ir prio_heap plugin graph - -lib_LTLIBRARIES = libbabeltrace2.la - -libbabeltrace2_la_SOURCES = \ - babeltrace2.c \ - value.c \ - util.c \ - lib-logging.c \ - logging.c \ - object-pool.c -libbabeltrace2_la_LDFLAGS = $(LT_NO_UNDEFINED) \ - -version-info $(BABELTRACE_LIBRARY_VERSION) - -libbabeltrace2_la_LIBADD = \ - prio_heap/libprio_heap.la \ - graph/libgraph.la \ - plugin/libplugin.la \ - trace-ir/libtrace-ir.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/compat/libcompat.la - -if ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT -libbabeltrace2_la_LIBADD += $(top_builddir)/python-plugin-provider/libbabeltrace2-python-plugin-provider.la -endif diff --git a/lib/prio_heap/Makefile.am b/lib/prio_heap/Makefile.am deleted file mode 100644 index d1e23b0f..00000000 --- a/lib/prio_heap/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -noinst_LTLIBRARIES = libprio_heap.la - -libprio_heap_la_SOURCES = prio_heap.c diff --git a/plugins/utils/muxer/logging.h b/plugins/utils/muxer/logging.h deleted file mode 100644 index 176122f5..00000000 --- a/plugins/utils/muxer/logging.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef PLUGINS_UTILS_MUXER_LOGGING_H -#define PLUGINS_UTILS_MUXER_LOGGING_H - -/* - * Copyright (c) 2017 Philippe Proulx - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_muxer_log_level -#include - -BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_utils_muxer_log_level); - -#endif /* PLUGINS_UTILS_MUXER_LOGGING_H */ diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..28b7bd4c --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,15 @@ +SUBDIRS = \ + common \ + ctfser \ + fd-cache \ + compat \ + logging \ + ctf-writer \ + lib \ + python-plugin-provider \ + plugins \ + cli \ + bindings + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = babeltrace2.pc babeltrace2-ctf-writer.pc diff --git a/babeltrace2-ctf-writer.pc.in b/src/babeltrace2-ctf-writer.pc.in similarity index 100% rename from babeltrace2-ctf-writer.pc.in rename to src/babeltrace2-ctf-writer.pc.in diff --git a/babeltrace2.pc.in b/src/babeltrace2.pc.in similarity index 100% rename from babeltrace2.pc.in rename to src/babeltrace2.pc.in diff --git a/bindings/Makefile.am b/src/bindings/Makefile.am similarity index 100% rename from bindings/Makefile.am rename to src/bindings/Makefile.am diff --git a/bindings/python/Makefile.am b/src/bindings/python/Makefile.am similarity index 100% rename from bindings/python/Makefile.am rename to src/bindings/python/Makefile.am diff --git a/bindings/python/bt2/.gitignore b/src/bindings/python/bt2/.gitignore similarity index 100% rename from bindings/python/bt2/.gitignore rename to src/bindings/python/bt2/.gitignore diff --git a/bindings/python/bt2/Makefile.am b/src/bindings/python/bt2/Makefile.am similarity index 98% rename from bindings/python/bt2/Makefile.am rename to src/bindings/python/bt2/Makefile.am index 31d9e177..70da6698 100644 --- a/bindings/python/bt2/Makefile.am +++ b/src/bindings/python/bt2/Makefile.am @@ -1,7 +1,7 @@ # Since the shared object used by the python bindings is not built with # libtool, we need to add the directory containing libbabeltrace2 to the # linker path. -AM_LDFLAGS=-L$(top_builddir)/lib/.libs +AM_LDFLAGS=-L$(top_builddir)/src/lib/.libs INSTALLED_FILES=$(builddir)/installed_files.txt diff --git a/bindings/python/bt2/bt2/__init__.py.in b/src/bindings/python/bt2/bt2/__init__.py.in similarity index 100% rename from bindings/python/bt2/bt2/__init__.py.in rename to src/bindings/python/bt2/bt2/__init__.py.in diff --git a/bindings/python/bt2/bt2/clock_class.py b/src/bindings/python/bt2/bt2/clock_class.py similarity index 100% rename from bindings/python/bt2/bt2/clock_class.py rename to src/bindings/python/bt2/bt2/clock_class.py diff --git a/bindings/python/bt2/bt2/clock_snapshot.py b/src/bindings/python/bt2/bt2/clock_snapshot.py similarity index 100% rename from bindings/python/bt2/bt2/clock_snapshot.py rename to src/bindings/python/bt2/bt2/clock_snapshot.py diff --git a/bindings/python/bt2/bt2/component.py b/src/bindings/python/bt2/bt2/component.py similarity index 100% rename from bindings/python/bt2/bt2/component.py rename to src/bindings/python/bt2/bt2/component.py diff --git a/bindings/python/bt2/bt2/connection.py b/src/bindings/python/bt2/bt2/connection.py similarity index 100% rename from bindings/python/bt2/bt2/connection.py rename to src/bindings/python/bt2/bt2/connection.py diff --git a/bindings/python/bt2/bt2/event.py b/src/bindings/python/bt2/bt2/event.py similarity index 100% rename from bindings/python/bt2/bt2/event.py rename to src/bindings/python/bt2/bt2/event.py diff --git a/bindings/python/bt2/bt2/event_class.py b/src/bindings/python/bt2/bt2/event_class.py similarity index 100% rename from bindings/python/bt2/bt2/event_class.py rename to src/bindings/python/bt2/bt2/event_class.py diff --git a/bindings/python/bt2/bt2/field.py b/src/bindings/python/bt2/bt2/field.py similarity index 100% rename from bindings/python/bt2/bt2/field.py rename to src/bindings/python/bt2/bt2/field.py diff --git a/bindings/python/bt2/bt2/field_class.py b/src/bindings/python/bt2/bt2/field_class.py similarity index 100% rename from bindings/python/bt2/bt2/field_class.py rename to src/bindings/python/bt2/bt2/field_class.py diff --git a/bindings/python/bt2/bt2/field_path.py b/src/bindings/python/bt2/bt2/field_path.py similarity index 100% rename from bindings/python/bt2/bt2/field_path.py rename to src/bindings/python/bt2/bt2/field_path.py diff --git a/bindings/python/bt2/bt2/graph.py b/src/bindings/python/bt2/bt2/graph.py similarity index 100% rename from bindings/python/bt2/bt2/graph.py rename to src/bindings/python/bt2/bt2/graph.py diff --git a/bindings/python/bt2/bt2/logging.c b/src/bindings/python/bt2/bt2/logging.c similarity index 96% rename from bindings/python/bt2/bt2/logging.c rename to src/bindings/python/bt2/bt2/logging.c index 698baf9f..a9738039 100644 --- a/bindings/python/bt2/bt2/logging.c +++ b/src/bindings/python/bt2/bt2/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_python_bindings_bt2_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_python_bindings_bt2_log_level, "BABELTRACE_PYTHON_BT2_LOG_LEVEL"); diff --git a/bindings/python/bt2/bt2/logging.h b/src/bindings/python/bt2/bt2/logging.h similarity index 97% rename from bindings/python/bt2/bt2/logging.h rename to src/bindings/python/bt2/bt2/logging.h index 21b58503..5f98158d 100644 --- a/bindings/python/bt2/bt2/logging.h +++ b/src/bindings/python/bt2/bt2/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_python_bindings_bt2_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_python_bindings_bt2_log_level); diff --git a/bindings/python/bt2/bt2/logging.py b/src/bindings/python/bt2/bt2/logging.py similarity index 100% rename from bindings/python/bt2/bt2/logging.py rename to src/bindings/python/bt2/bt2/logging.py diff --git a/bindings/python/bt2/bt2/message.py b/src/bindings/python/bt2/bt2/message.py similarity index 100% rename from bindings/python/bt2/bt2/message.py rename to src/bindings/python/bt2/bt2/message.py diff --git a/bindings/python/bt2/bt2/message_iterator.py b/src/bindings/python/bt2/bt2/message_iterator.py similarity index 100% rename from bindings/python/bt2/bt2/message_iterator.py rename to src/bindings/python/bt2/bt2/message_iterator.py diff --git a/bindings/python/bt2/bt2/native_bt.i b/src/bindings/python/bt2/bt2/native_bt.i similarity index 99% rename from bindings/python/bt2/bt2/native_bt.i rename to src/bindings/python/bt2/bt2/native_bt.i index 8a43edf0..bf20edc7 100644 --- a/bindings/python/bt2/bt2/native_bt.i +++ b/src/bindings/python/bt2/bt2/native_bt.i @@ -34,7 +34,7 @@ #include #include -#include +#include "common/assert.h" typedef const uint8_t *bt_uuid; %} diff --git a/bindings/python/bt2/bt2/native_bt_clock_class.i b/src/bindings/python/bt2/bt2/native_bt_clock_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_clock_class.i rename to src/bindings/python/bt2/bt2/native_bt_clock_class.i diff --git a/bindings/python/bt2/bt2/native_bt_clock_snapshot.i b/src/bindings/python/bt2/bt2/native_bt_clock_snapshot.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_clock_snapshot.i rename to src/bindings/python/bt2/bt2/native_bt_clock_snapshot.i diff --git a/bindings/python/bt2/bt2/native_bt_component.i b/src/bindings/python/bt2/bt2/native_bt_component.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_component.i rename to src/bindings/python/bt2/bt2/native_bt_component.i diff --git a/bindings/python/bt2/bt2/native_bt_component_class.i b/src/bindings/python/bt2/bt2/native_bt_component_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_component_class.i rename to src/bindings/python/bt2/bt2/native_bt_component_class.i diff --git a/bindings/python/bt2/bt2/native_bt_connection.i b/src/bindings/python/bt2/bt2/native_bt_connection.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_connection.i rename to src/bindings/python/bt2/bt2/native_bt_connection.i diff --git a/bindings/python/bt2/bt2/native_bt_event.i b/src/bindings/python/bt2/bt2/native_bt_event.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_event.i rename to src/bindings/python/bt2/bt2/native_bt_event.i diff --git a/bindings/python/bt2/bt2/native_bt_event_class.i b/src/bindings/python/bt2/bt2/native_bt_event_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_event_class.i rename to src/bindings/python/bt2/bt2/native_bt_event_class.i diff --git a/bindings/python/bt2/bt2/native_bt_field.i b/src/bindings/python/bt2/bt2/native_bt_field.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_field.i rename to src/bindings/python/bt2/bt2/native_bt_field.i diff --git a/bindings/python/bt2/bt2/native_bt_field_class.i b/src/bindings/python/bt2/bt2/native_bt_field_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_field_class.i rename to src/bindings/python/bt2/bt2/native_bt_field_class.i diff --git a/bindings/python/bt2/bt2/native_bt_field_path.i b/src/bindings/python/bt2/bt2/native_bt_field_path.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_field_path.i rename to src/bindings/python/bt2/bt2/native_bt_field_path.i diff --git a/bindings/python/bt2/bt2/native_bt_graph.i b/src/bindings/python/bt2/bt2/native_bt_graph.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_graph.i rename to src/bindings/python/bt2/bt2/native_bt_graph.i diff --git a/bindings/python/bt2/bt2/native_bt_logging.i b/src/bindings/python/bt2/bt2/native_bt_logging.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_logging.i rename to src/bindings/python/bt2/bt2/native_bt_logging.i diff --git a/bindings/python/bt2/bt2/native_bt_message.i b/src/bindings/python/bt2/bt2/native_bt_message.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_message.i rename to src/bindings/python/bt2/bt2/native_bt_message.i diff --git a/bindings/python/bt2/bt2/native_bt_notifier.i b/src/bindings/python/bt2/bt2/native_bt_notifier.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_notifier.i rename to src/bindings/python/bt2/bt2/native_bt_notifier.i diff --git a/bindings/python/bt2/bt2/native_bt_packet.i b/src/bindings/python/bt2/bt2/native_bt_packet.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_packet.i rename to src/bindings/python/bt2/bt2/native_bt_packet.i diff --git a/bindings/python/bt2/bt2/native_bt_plugin.i b/src/bindings/python/bt2/bt2/native_bt_plugin.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_plugin.i rename to src/bindings/python/bt2/bt2/native_bt_plugin.i diff --git a/bindings/python/bt2/bt2/native_bt_port.i b/src/bindings/python/bt2/bt2/native_bt_port.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_port.i rename to src/bindings/python/bt2/bt2/native_bt_port.i diff --git a/bindings/python/bt2/bt2/native_bt_query_exec.i b/src/bindings/python/bt2/bt2/native_bt_query_exec.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_query_exec.i rename to src/bindings/python/bt2/bt2/native_bt_query_exec.i diff --git a/bindings/python/bt2/bt2/native_bt_stream.i b/src/bindings/python/bt2/bt2/native_bt_stream.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_stream.i rename to src/bindings/python/bt2/bt2/native_bt_stream.i diff --git a/bindings/python/bt2/bt2/native_bt_stream_class.i b/src/bindings/python/bt2/bt2/native_bt_stream_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_stream_class.i rename to src/bindings/python/bt2/bt2/native_bt_stream_class.i diff --git a/bindings/python/bt2/bt2/native_bt_trace.i b/src/bindings/python/bt2/bt2/native_bt_trace.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_trace.i rename to src/bindings/python/bt2/bt2/native_bt_trace.i diff --git a/bindings/python/bt2/bt2/native_bt_trace_class.i b/src/bindings/python/bt2/bt2/native_bt_trace_class.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_trace_class.i rename to src/bindings/python/bt2/bt2/native_bt_trace_class.i diff --git a/bindings/python/bt2/bt2/native_bt_value.i b/src/bindings/python/bt2/bt2/native_bt_value.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_value.i rename to src/bindings/python/bt2/bt2/native_bt_value.i diff --git a/bindings/python/bt2/bt2/native_bt_version.i b/src/bindings/python/bt2/bt2/native_bt_version.i similarity index 100% rename from bindings/python/bt2/bt2/native_bt_version.i rename to src/bindings/python/bt2/bt2/native_bt_version.i diff --git a/bindings/python/bt2/bt2/object.py b/src/bindings/python/bt2/bt2/object.py similarity index 100% rename from bindings/python/bt2/bt2/object.py rename to src/bindings/python/bt2/bt2/object.py diff --git a/bindings/python/bt2/bt2/packet.py b/src/bindings/python/bt2/bt2/packet.py similarity index 100% rename from bindings/python/bt2/bt2/packet.py rename to src/bindings/python/bt2/bt2/packet.py diff --git a/bindings/python/bt2/bt2/plugin.py b/src/bindings/python/bt2/bt2/plugin.py similarity index 100% rename from bindings/python/bt2/bt2/plugin.py rename to src/bindings/python/bt2/bt2/plugin.py diff --git a/bindings/python/bt2/bt2/port.py b/src/bindings/python/bt2/bt2/port.py similarity index 100% rename from bindings/python/bt2/bt2/port.py rename to src/bindings/python/bt2/bt2/port.py diff --git a/bindings/python/bt2/bt2/py_plugin.py b/src/bindings/python/bt2/bt2/py_plugin.py similarity index 100% rename from bindings/python/bt2/bt2/py_plugin.py rename to src/bindings/python/bt2/bt2/py_plugin.py diff --git a/bindings/python/bt2/bt2/query_executor.py b/src/bindings/python/bt2/bt2/query_executor.py similarity index 100% rename from bindings/python/bt2/bt2/query_executor.py rename to src/bindings/python/bt2/bt2/query_executor.py diff --git a/bindings/python/bt2/bt2/stream.py b/src/bindings/python/bt2/bt2/stream.py similarity index 100% rename from bindings/python/bt2/bt2/stream.py rename to src/bindings/python/bt2/bt2/stream.py diff --git a/bindings/python/bt2/bt2/stream_class.py b/src/bindings/python/bt2/bt2/stream_class.py similarity index 100% rename from bindings/python/bt2/bt2/stream_class.py rename to src/bindings/python/bt2/bt2/stream_class.py diff --git a/bindings/python/bt2/bt2/trace.py b/src/bindings/python/bt2/bt2/trace.py similarity index 100% rename from bindings/python/bt2/bt2/trace.py rename to src/bindings/python/bt2/bt2/trace.py diff --git a/bindings/python/bt2/bt2/trace_class.py b/src/bindings/python/bt2/bt2/trace_class.py similarity index 100% rename from bindings/python/bt2/bt2/trace_class.py rename to src/bindings/python/bt2/bt2/trace_class.py diff --git a/bindings/python/bt2/bt2/trace_collection_message_iterator.py b/src/bindings/python/bt2/bt2/trace_collection_message_iterator.py similarity index 100% rename from bindings/python/bt2/bt2/trace_collection_message_iterator.py rename to src/bindings/python/bt2/bt2/trace_collection_message_iterator.py diff --git a/bindings/python/bt2/bt2/utils.py b/src/bindings/python/bt2/bt2/utils.py similarity index 100% rename from bindings/python/bt2/bt2/utils.py rename to src/bindings/python/bt2/bt2/utils.py diff --git a/bindings/python/bt2/bt2/value.py b/src/bindings/python/bt2/bt2/value.py similarity index 100% rename from bindings/python/bt2/bt2/value.py rename to src/bindings/python/bt2/bt2/value.py diff --git a/bindings/python/bt2/setup.py.in b/src/bindings/python/bt2/setup.py.in similarity index 95% rename from bindings/python/bt2/setup.py.in rename to src/bindings/python/bt2/setup.py.in index aeeac8f7..bc1a735f 100644 --- a/bindings/python/bt2/setup.py.in +++ b/src/bindings/python/bt2/setup.py.in @@ -38,8 +38,8 @@ def main(): babeltrace_ext = Extension('bt2._native_bt', sources=['bt2/native_bt.i', 'bt2/logging.c'], libraries=['babeltrace2', 'glib-2.0'], - extra_objects=['@top_builddir@/logging/.libs/libbabeltrace2-logging.a', - '@top_builddir@/common/.libs/libbabeltrace2-common.a'],) + extra_objects=['@top_builddir@/src/logging/.libs/libbabeltrace2-logging.a', + '@top_builddir@/src/common/.libs/libbabeltrace2-common.a'],) dist = setup(name='bt2', version='@PACKAGE_VERSION@', diff --git a/cli/Makefile.am b/src/cli/Makefile.am similarity index 88% rename from cli/Makefile.am rename to src/cli/Makefile.am index 6a7cc881..45297d52 100644 --- a/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -1,4 +1,4 @@ -PLUGINS_PATH = $(abs_top_builddir)/plugins +PLUGINS_PATH = $(abs_top_builddir)/src/plugins LTTNG_UTILS_PLUGIN_PATH = if ENABLE_DEBUG_INFO @@ -41,10 +41,10 @@ babeltrace2_bin_LDFLAGS = $(LD_NO_AS_NEEDED) # not discard the plugins since the CLI does not use their symbols # directly). babeltrace2_bin_LDADD = \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/compat/libcompat.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/compat/libcompat.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ $(POPT_LIBS) if ENABLE_BUILT_IN_PLUGINS @@ -88,11 +88,11 @@ babeltrace2_CFLAGS = $(AM_CFLAGS) -DBT_SET_DEFAULT_IN_TREE_CONFIGURATION # babeltrace2-log rules and config below babeltrace2_log_bin_SOURCES = babeltrace2-log.c babeltrace2_log_bin_LDADD = \ - $(top_builddir)/compat/libcompat.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/compat/libcompat.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ $(POPT_LIBS) -babeltrace2_log_bin_CFLAGS = $(AM_CFLAGS) '-DBT_CLI_PATH="$(abs_top_builddir)/cli/babeltrace2$(EXEEXT)"' +babeltrace2_log_bin_CFLAGS = $(AM_CFLAGS) '-DBT_CLI_PATH="$(abs_top_builddir)/src/cli/babeltrace2$(EXEEXT)"' # Only used for in-tree execution and tests babeltrace2_log_SOURCES = $(babeltrace2_log_bin_SOURCES) diff --git a/cli/babeltrace2-cfg-cli-args-connect.c b/src/cli/babeltrace2-cfg-cli-args-connect.c similarity index 99% rename from cli/babeltrace2-cfg-cli-args-connect.c rename to src/cli/babeltrace2-cfg-cli-args-connect.c index f269ecc6..7e1657e0 100644 --- a/cli/babeltrace2-cfg-cli-args-connect.c +++ b/src/cli/babeltrace2-cfg-cli-args-connect.c @@ -22,7 +22,7 @@ #include #include -#include +#include "common/common.h" #include "babeltrace2-cfg.h" #include "babeltrace2-cfg-cli-args-connect.h" diff --git a/cli/babeltrace2-cfg-cli-args-connect.h b/src/cli/babeltrace2-cfg-cli-args-connect.h similarity index 100% rename from cli/babeltrace2-cfg-cli-args-connect.h rename to src/cli/babeltrace2-cfg-cli-args-connect.h diff --git a/cli/babeltrace2-cfg-cli-args-default.c b/src/cli/babeltrace2-cfg-cli-args-default.c similarity index 100% rename from cli/babeltrace2-cfg-cli-args-default.c rename to src/cli/babeltrace2-cfg-cli-args-default.c diff --git a/cli/babeltrace2-cfg-cli-args-default.h b/src/cli/babeltrace2-cfg-cli-args-default.h similarity index 100% rename from cli/babeltrace2-cfg-cli-args-default.h rename to src/cli/babeltrace2-cfg-cli-args-default.h diff --git a/cli/babeltrace2-cfg-cli-args.c b/src/cli/babeltrace2-cfg-cli-args.c similarity index 99% rename from cli/babeltrace2-cfg-cli-args.c rename to src/cli/babeltrace2-cfg-cli-args.c index a042d89a..e1470d72 100644 --- a/cli/babeltrace2-cfg-cli-args.c +++ b/src/cli/babeltrace2-cfg-cli-args.c @@ -28,19 +28,19 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include #include -#include +#include "common/common.h" #include #include #include #include "babeltrace2-cfg.h" #include "babeltrace2-cfg-cli-args.h" #include "babeltrace2-cfg-cli-args-connect.h" -#include "version.h" +#include "common/version.h" /* * Error printf() macro which prepends "Error: " the first time it's diff --git a/cli/babeltrace2-cfg-cli-args.h b/src/cli/babeltrace2-cfg-cli-args.h similarity index 95% rename from cli/babeltrace2-cfg-cli-args.h rename to src/cli/babeltrace2-cfg-cli-args.h index 7f1fd003..8a458c22 100644 --- a/cli/babeltrace2-cfg-cli-args.h +++ b/src/cli/babeltrace2-cfg-cli-args.h @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" #include #include diff --git a/cli/babeltrace2-cfg.c b/src/cli/babeltrace2-cfg.c similarity index 98% rename from cli/babeltrace2-cfg.c rename to src/cli/babeltrace2-cfg.c index 4704efb3..4c764a9e 100644 --- a/cli/babeltrace2-cfg.c +++ b/src/cli/babeltrace2-cfg.c @@ -22,7 +22,7 @@ * SOFTWARE. */ -#include +#include "common/common.h" #include #include #include "babeltrace2-cfg.h" diff --git a/cli/babeltrace2-cfg.h b/src/cli/babeltrace2-cfg.h similarity index 97% rename from cli/babeltrace2-cfg.h rename to src/cli/babeltrace2-cfg.h index 0608e36d..a5cc7fcf 100644 --- a/cli/babeltrace2-cfg.h +++ b/src/cli/babeltrace2-cfg.h @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" #include #include diff --git a/cli/babeltrace2-log.c b/src/cli/babeltrace2-log.c similarity index 99% rename from cli/babeltrace2-log.c rename to src/cli/babeltrace2-log.c index 7d6021d9..59f34e5d 100644 --- a/cli/babeltrace2-log.c +++ b/src/cli/babeltrace2-log.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include diff --git a/cli/babeltrace2.c b/src/cli/babeltrace2.c similarity index 99% rename from cli/babeltrace2.c rename to src/cli/babeltrace2.c index 91dc1ce5..b4285e5b 100644 --- a/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -26,7 +26,7 @@ #include "logging.h" #include -#include +#include "common/common.h" #include #include #include diff --git a/cli/logging.c b/src/cli/logging.c similarity index 96% rename from cli/logging.c rename to src/cli/logging.c index a2a522bc..92869482 100644 --- a/cli/logging.c +++ b/src/cli/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_cli_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_cli_log_level, "BABELTRACE_CLI_LOG_LEVEL"); diff --git a/cli/logging.h b/src/cli/logging.h similarity index 96% rename from cli/logging.h rename to src/cli/logging.h index 6e5dc9fe..dd6c1d09 100644 --- a/cli/logging.h +++ b/src/cli/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_cli_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_cli_log_level); diff --git a/src/common/Makefile.am b/src/common/Makefile.am new file mode 100644 index 00000000..1a73672f --- /dev/null +++ b/src/common/Makefile.am @@ -0,0 +1,89 @@ +AM_CPPFLAGS += -DINSTALL_LIBDIR=\"$(libdir)\" + +noinst_LTLIBRARIES = libbabeltrace2-common.la + +libbabeltrace2_common_la_SOURCES = \ + assert.h \ + assert.c \ + common.c \ + common.h \ + logging.c \ + logging.h + +noinst_HEADERS = \ + align.h \ + babeltrace.h \ + list.h \ + mmap-align.h \ + version.h \ + version.i + +## +## This target generates an include file that contains the git version +## string of the current branch, it must be continuously updated when +## we build in the git repo and shipped in dist tarballs to reflect the +## status of the tree when it was generated. If the tree is clean and +## the current commit is tag a starting with "v", consider this a +## release version and set an empty git version. +## +## Here is what the inline script does: +## +## First, delete any stale "version.i.tmp" file. +## +## If "bootstrap" and ".git" exists in the top source directory and the git +## executable is available, get the current git version string in the form: +## +## "latest_tag"(-"number_of_commits_on_top")(-g"latest_commit_hash")(-dirty) +## +## And store it in "version.i.tmp", if the current commit is tagged, the tag +## starts with "v" and the tree is clean, consider this a release version and +## overwrite the git version with an empty string in "version.i.tmp". +## +## If we don't have a "version.i.tmp" nor a "version.i", generate an empty +## string as a failover. +## +## If we don't have a "version.i" or we have both files and they are different, +## copy "version.i.tmp" over "version.i". This way the dependent targets are +## only rebuilt when the version string changes. +## + +version_verbose = $(version_verbose_@AM_V@) +version_verbose_ = $(version_verbose_@AM_DEFAULT_V@) +version_verbose_0 = @echo " GEN " $@; + +version.i: + $(version_verbose)rm -f version.i.tmp; \ + if (test -r "$(top_srcdir)/bootstrap" && test -r "$(top_srcdir)/.git") && \ + test -x "`which git 2>&1;true`"; then \ + GIT_VERSION_STR="`cd "$(top_srcdir)" && git describe --tags --dirty`"; \ + GIT_CURRENT_TAG="`cd "$(top_srcdir)" && git describe --tags --exact-match --match="v[0-9]*" HEAD 2> /dev/null`"; \ + echo "#define GIT_VERSION \"$$GIT_VERSION_STR\"" > version.i.tmp; \ + if ! $(GREP) -- "-dirty" version.i.tmp > /dev/null && \ + test "x$$GIT_CURRENT_TAG" != "x"; then \ + echo "#define GIT_VERSION \"\"" > version.i.tmp; \ + fi; \ + fi; \ + if test ! -f version.i.tmp; then \ + if test ! -f version.i; then \ + echo '#define GIT_VERSION ""' > version.i; \ + fi; \ + elif test ! -f version.i || \ + test x"`cat version.i.tmp`" != x"`cat version.i`"; then \ + mv version.i.tmp version.i; \ + fi; \ + rm -f version.i.tmp; \ + true + +## +## version.i is defined as a .PHONY target even if it's a real file, +## we want the target to be re-run on every make. +## +.PHONY: version.i + +CLEANFILES = version.i.tmp + +## +## Only clean "version.i" on dist-clean, we need to keep it on regular +## clean when it's part of a dist tarball. +## +DISTCLEANFILES = version.i diff --git a/include/babeltrace2/align-internal.h b/src/common/align.h similarity index 97% rename from include/babeltrace2/align-internal.h rename to src/common/align.h index 4e76cd01..d27b5b53 100644 --- a/include/babeltrace2/align-internal.h +++ b/src/common/align.h @@ -23,8 +23,8 @@ * SOFTWARE. */ -#include -#include +#include "compat/compiler.h" +#include "compat/limits.h" #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1) #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) diff --git a/common/assert.c b/src/common/assert.c similarity index 95% rename from common/assert.c rename to src/common/assert.c index 1e28219f..056e2f26 100644 --- a/common/assert.c +++ b/src/common/assert.c @@ -20,8 +20,8 @@ * SOFTWARE. */ -#include -#include +#include "common/assert.h" +#include "common/common.h" void bt_common_assert_failed(const char *file, int line, const char *func, const char *assertion) diff --git a/include/babeltrace2/assert-internal.h b/src/common/assert.h similarity index 98% rename from include/babeltrace2/assert-internal.h rename to src/common/assert.h index 2df876d6..27fdeadb 100644 --- a/include/babeltrace2/assert-internal.h +++ b/src/common/assert.h @@ -25,7 +25,7 @@ */ #include -#include +#include "common/babeltrace.h" #ifdef BT_DEBUG_MODE diff --git a/include/babeltrace2/babeltrace-internal.h b/src/common/babeltrace.h similarity index 98% rename from include/babeltrace2/babeltrace-internal.h rename to src/common/babeltrace.h index c30725d4..49dfb1b3 100644 --- a/include/babeltrace2/babeltrace-internal.h +++ b/src/common/babeltrace.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include "compat/string.h" #include #define PERROR_BUFLEN 200 diff --git a/common/common.c b/src/common/common.c similarity index 99% rename from common/common.c rename to src/common/common.c index f2fd0b82..f37bec41 100644 --- a/common/common.c +++ b/src/common/common.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/common.h" +#include "compat/unistd.h" #ifndef __MINGW32__ #include diff --git a/include/babeltrace2/common-internal.h b/src/common/common.h similarity index 99% rename from include/babeltrace2/common-internal.h rename to src/common/common.h index d30da975..13dbaf49 100644 --- a/include/babeltrace2/common-internal.h +++ b/src/common/common.h @@ -25,8 +25,8 @@ */ #include -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" #include #include #include diff --git a/include/babeltrace2/list-internal.h b/src/common/list.h similarity index 100% rename from include/babeltrace2/list-internal.h rename to src/common/list.h diff --git a/common/logging.c b/src/common/logging.c similarity index 96% rename from common/logging.c rename to src/common/logging.c index 234ee628..7af804b9 100644 --- a/common/logging.c +++ b/src/common/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_common_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_common_log_level, "BABELTRACE_COMMON_LOG_LEVEL"); diff --git a/common/logging.h b/src/common/logging.h similarity index 96% rename from common/logging.h rename to src/common/logging.h index a7029dc5..48e1f7b2 100644 --- a/common/logging.h +++ b/src/common/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_common_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_common_log_level); diff --git a/include/babeltrace2/mmap-align-internal.h b/src/common/mmap-align.h similarity index 96% rename from include/babeltrace2/mmap-align-internal.h rename to src/common/mmap-align.h index 1f99ca6c..1bb2b72f 100644 --- a/include/babeltrace2/mmap-align-internal.h +++ b/src/common/mmap-align.h @@ -23,11 +23,11 @@ * SOFTWARE. */ -#include +#include "common/align.h" #include #include -#include -#include +#include "compat/mman.h" +#include "common/common.h" /* * This header implements a wrapper over mmap (mmap_align) that memory diff --git a/include/version.h b/src/common/version.h similarity index 97% rename from include/version.h rename to src/common/version.h index 4f802517..acae2c40 100644 --- a/include/version.h +++ b/src/common/version.h @@ -23,6 +23,6 @@ * SOFTWARE. */ -#include "version.i" +#include "common/version.i" #endif /* VERSION_H */ diff --git a/src/compat/Makefile.am b/src/compat/Makefile.am new file mode 100644 index 00000000..040ccc8d --- /dev/null +++ b/src/compat/Makefile.am @@ -0,0 +1,32 @@ +noinst_LTLIBRARIES = libcompat.la + +libcompat_la_SOURCES = \ + logging.c \ + logging.h \ + mman.c \ + mman.h \ + uuid.c \ + uuid.h + +libcompat_la_LDFLAGS = \ + $(LD_NO_AS_NEEDED) + +if BABELTRACE_BUILD_WITH_MINGW +libcompat_la_LDFLAGS += -lrpcrt4 +endif + +noinst_HEADERS = \ + bitfield.h \ + compiler.h \ + endian.h \ + fcntl.h \ + glib.h \ + limits.h \ + memstream.h \ + socket.h \ + stdio.h \ + stdlib.h \ + string.h \ + time.h \ + unistd.h \ + utc.h diff --git a/include/babeltrace2/bitfield-internal.h b/src/compat/bitfield.h similarity index 99% rename from include/babeltrace2/bitfield-internal.h rename to src/compat/bitfield.h index 1835b9d9..a24904bd 100644 --- a/include/babeltrace2/bitfield-internal.h +++ b/src/compat/bitfield.h @@ -25,8 +25,8 @@ #include /* C99 5.2.4.2 Numerical limits */ #include /* C99 7.16 bool type */ -#include /* C99 5.2.4.2 Numerical limits */ -#include /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */ +#include "compat/limits.h" /* C99 5.2.4.2 Numerical limits */ +#include "compat/endian.h" /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */ /* * This header strictly follows the C99 standard, except for use of the diff --git a/include/babeltrace2/compiler-internal.h b/src/compat/compiler.h similarity index 100% rename from include/babeltrace2/compiler-internal.h rename to src/compat/compiler.h diff --git a/include/babeltrace2/endian-internal.h b/src/compat/endian.h similarity index 100% rename from include/babeltrace2/endian-internal.h rename to src/compat/endian.h diff --git a/include/babeltrace2/compat/fcntl-internal.h b/src/compat/fcntl.h similarity index 100% rename from include/babeltrace2/compat/fcntl-internal.h rename to src/compat/fcntl.h diff --git a/include/babeltrace2/compat/glib-internal.h b/src/compat/glib.h similarity index 100% rename from include/babeltrace2/compat/glib-internal.h rename to src/compat/glib.h diff --git a/include/babeltrace2/compat/limits-internal.h b/src/compat/limits.h similarity index 100% rename from include/babeltrace2/compat/limits-internal.h rename to src/compat/limits.h diff --git a/compat/logging.c b/src/compat/logging.c similarity index 96% rename from compat/logging.c rename to src/compat/logging.c index 1a359525..a79cc10f 100644 --- a/compat/logging.c +++ b/src/compat/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_compat_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_compat_log_level, "BABELTRACE_COMPAT_LOG_LEVEL"); diff --git a/compat/logging.h b/src/compat/logging.h similarity index 96% rename from compat/logging.h rename to src/compat/logging.h index 6e4b5d26..ccb77a9d 100644 --- a/compat/logging.h +++ b/src/compat/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_compat_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_compat_log_level); diff --git a/include/babeltrace2/compat/memstream-internal.h b/src/compat/memstream.h similarity index 99% rename from include/babeltrace2/compat/memstream-internal.h rename to src/compat/memstream.h index 60ff60bd..8dea7a44 100644 --- a/include/babeltrace2/compat/memstream-internal.h +++ b/src/compat/memstream.h @@ -41,7 +41,7 @@ FILE *bt_fmemopen(void *buf, size_t size, const char *mode) #include #include #include -#include +#include "compat/endian.h" #ifdef __MINGW32__ diff --git a/compat/compat_mman.c b/src/compat/mman.c similarity index 99% rename from compat/compat_mman.c rename to src/compat/mman.c index bef80d48..d0cea9df 100644 --- a/compat/compat_mman.c +++ b/src/compat/mman.c @@ -45,7 +45,7 @@ int bt_mman_dummy_symbol; #include #include #include -#include +#include "compat/mman.h" struct mmap_mapping { /* The duplicated handle. */ diff --git a/include/babeltrace2/compat/mman-internal.h b/src/compat/mman.h similarity index 100% rename from include/babeltrace2/compat/mman-internal.h rename to src/compat/mman.h diff --git a/include/babeltrace2/compat/socket-internal.h b/src/compat/socket.h similarity index 100% rename from include/babeltrace2/compat/socket-internal.h rename to src/compat/socket.h diff --git a/include/babeltrace2/compat/stdio-internal.h b/src/compat/stdio.h similarity index 98% rename from include/babeltrace2/compat/stdio-internal.h rename to src/compat/stdio.h index 4c737639..906e695d 100644 --- a/include/babeltrace2/compat/stdio-internal.h +++ b/src/compat/stdio.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include "common/assert.h" #define BT_GETLINE_MINBUFLEN 64 diff --git a/include/babeltrace2/compat/stdlib-internal.h b/src/compat/stdlib.h similarity index 100% rename from include/babeltrace2/compat/stdlib-internal.h rename to src/compat/stdlib.h diff --git a/include/babeltrace2/compat/string-internal.h b/src/compat/string.h similarity index 100% rename from include/babeltrace2/compat/string-internal.h rename to src/compat/string.h diff --git a/include/babeltrace2/compat/time-internal.h b/src/compat/time.h similarity index 100% rename from include/babeltrace2/compat/time-internal.h rename to src/compat/time.h diff --git a/include/babeltrace2/compat/unistd-internal.h b/src/compat/unistd.h similarity index 100% rename from include/babeltrace2/compat/unistd-internal.h rename to src/compat/unistd.h diff --git a/include/babeltrace2/compat/utc-internal.h b/src/compat/utc.h similarity index 100% rename from include/babeltrace2/compat/utc-internal.h rename to src/compat/utc.h diff --git a/compat/compat_uuid.c b/src/compat/uuid.c similarity index 98% rename from compat/compat_uuid.c rename to src/compat/uuid.c index b367ec13..0b050e3d 100644 --- a/compat/compat_uuid.c +++ b/src/compat/uuid.c @@ -38,7 +38,7 @@ int bt_uuid_dummy_symbol; #include #include -#include +#include "compat/uuid.h" /* MinGW does not provide byteswap - implement our own version. */ static diff --git a/include/babeltrace2/compat/uuid-internal.h b/src/compat/uuid.h similarity index 100% rename from include/babeltrace2/compat/uuid-internal.h rename to src/compat/uuid.h diff --git a/ctf-writer/Makefile.am b/src/ctf-writer/Makefile.am similarity index 51% rename from ctf-writer/Makefile.am rename to src/ctf-writer/Makefile.am index 7c5d046e..be8d1e1c 100644 --- a/ctf-writer/Makefile.am +++ b/src/ctf-writer/Makefile.am @@ -1,36 +1,58 @@ lib_LTLIBRARIES = libbabeltrace2-ctf-writer.la libbabeltrace2_ctf_writer_la_SOURCES = \ + assert-pre.h \ attributes.c \ + attributes.h \ clock.c \ clock-class.c \ + clock-class.h \ + clock.h \ event.c \ event-class.c \ + event-class.h \ + event.h \ field-path.c \ + field-path.h \ fields.c \ + fields.h \ field-types.c \ + field-types.h \ field-wrapper.c \ + field-wrapper.h \ functor.c \ + functor.h \ logging.c \ logging.h \ object.c \ + object.h \ object-pool.c \ + object-pool.h \ resolve.c \ + resolve.h \ stream.c \ stream-class.c \ + stream-class.h \ + stream.h \ trace.c \ + trace.h \ utils.c \ + utils.h \ validation.c \ + validation.h \ values.c \ + values.h \ visitor.c \ - writer.c + visitor.h \ + writer.c \ + writer.h libbabeltrace2_ctf_writer_la_LDFLAGS = $(LT_NO_UNDEFINED) \ -version-info $(BABELTRACE_LIBRARY_VERSION) libbabeltrace2_ctf_writer_la_LIBADD = \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/ctfser/libbabeltrace2-ctfser.la \ - $(top_builddir)/compat/libcompat.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/ctfser/libbabeltrace2-ctfser.la \ + $(top_builddir)/src/compat/libcompat.la \ $(UUID_LIBS) diff --git a/include/babeltrace2/ctf-writer/assert-pre-internal.h b/src/ctf-writer/assert-pre.h similarity index 91% rename from include/babeltrace2/ctf-writer/assert-pre-internal.h rename to src/ctf-writer/assert-pre.h index 3ac3af1c..8f66d514 100644 --- a/include/babeltrace2/ctf-writer/assert-pre-internal.h +++ b/src/ctf-writer/assert-pre.h @@ -26,24 +26,24 @@ /* * The macros in this header use macros defined in - * . We don't want this header to - * automatically include because you + * . We don't want this header to + * automatically include because you * need to manually define BT_LOG_TAG before including - * and it is unexpected that you + * and it is unexpected that you * also need to define it before including this header. * * This is a reminder that in order to use - * , you also need to use logging + * , you also need to use logging * explicitly. */ #ifndef BABELTRACE_LOGGING_INTERNAL_H -# error Include before this header. +# error Include before this header. #endif #include #include -#include +#include "common/babeltrace.h" #ifdef BT_DEV_MODE /* diff --git a/ctf-writer/attributes.c b/src/ctf-writer/attributes.c similarity index 97% rename from ctf-writer/attributes.c rename to src/ctf-writer/attributes.c index fbb81a03..e79dc58f 100644 --- a/ctf-writer/attributes.c +++ b/src/ctf-writer/attributes.c @@ -28,15 +28,14 @@ #define BT_LOG_TAG "CTF-WRITER-ATTRS" #include "logging.h" -#include -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" +#include "compat/string.h" #include -#include -#include -#include #include +#include "values.h" + #define BT_CTF_ATTR_NAME_INDEX 0 #define BT_CTF_ATTR_VALUE_INDEX 1 diff --git a/include/babeltrace2/ctf-writer/attributes-internal.h b/src/ctf-writer/attributes.h similarity index 95% rename from include/babeltrace2/ctf-writer/attributes-internal.h rename to src/ctf-writer/attributes.h index cb365128..a9906533 100644 --- a/include/babeltrace2/ctf-writer/attributes-internal.h +++ b/src/ctf-writer/attributes.h @@ -29,8 +29,9 @@ extern "C" { #endif #include -#include -#include +#include "common/babeltrace.h" + +#include "values.h" BT_HIDDEN struct bt_ctf_private_value *bt_ctf_attributes_create(void); diff --git a/ctf-writer/clock-class.c b/src/ctf-writer/clock-class.c similarity index 98% rename from ctf-writer/clock-class.c rename to src/ctf-writer/clock-class.c index 1c507e37..258d4a6c 100644 --- a/ctf-writer/clock-class.c +++ b/src/ctf-writer/clock-class.c @@ -29,17 +29,18 @@ #define BT_LOG_TAG "CTF-WRITER-CLOCK-CLASS" #include "logging.h" -#include -#include -#include +#include "compat/uuid.h" #include #include -#include +#include "compat/compiler.h" #include -#include +#include "compat/string.h" #include -#include -#include +#include "common/assert.h" + +#include "assert-pre.h" +#include "clock-class.h" +#include "object.h" static void bt_ctf_clock_class_destroy(struct bt_ctf_object *obj); diff --git a/include/babeltrace2/ctf-writer/clock-class-internal.h b/src/ctf-writer/clock-class.h similarity index 95% rename from include/babeltrace2/ctf-writer/clock-class-internal.h rename to src/ctf-writer/clock-class.h index a9d96721..d3175085 100644 --- a/include/babeltrace2/ctf-writer/clock-class-internal.h +++ b/src/ctf-writer/clock-class.h @@ -25,15 +25,16 @@ * SOFTWARE. */ -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "lib/object-pool.h" +#include "compat/uuid.h" #include #include #include #include +#include "object.h" + struct bt_ctf_clock_class { struct bt_ctf_object base; GString *name; diff --git a/ctf-writer/clock.c b/src/ctf-writer/clock.c similarity index 96% rename from ctf-writer/clock.c rename to src/ctf-writer/clock.c index 0238c25b..cb559265 100644 --- a/ctf-writer/clock.c +++ b/src/ctf-writer/clock.c @@ -30,17 +30,18 @@ #define BT_LOG_TAG "CTF-WRITER-CLOCK" #include "logging.h" -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "compat/uuid.h" +#include "compat/compiler.h" #include -#include -#include #include #include +#include "clock-class.h" +#include "clock.h" +#include "object.h" +#include "writer.h" + static void bt_ctf_clock_destroy(struct bt_ctf_object *obj); diff --git a/include/babeltrace2/ctf-writer/clock-internal.h b/src/ctf-writer/clock.h similarity index 87% rename from include/babeltrace2/ctf-writer/clock-internal.h rename to src/ctf-writer/clock.h index 8d3e1418..f510d736 100644 --- a/include/babeltrace2/ctf-writer/clock-internal.h +++ b/src/ctf-writer/clock.h @@ -24,12 +24,13 @@ */ #include -#include -#include -#include -#include +#include "common/babeltrace.h" #include -#include +#include "compat/uuid.h" + +#include "clock-class.h" +#include "object.h" +#include "trace.h" struct bt_ctf_clock { struct bt_ctf_object base; diff --git a/ctf-writer/event-class.c b/src/ctf-writer/event-class.c similarity index 95% rename from ctf-writer/event-class.c rename to src/ctf-writer/event-class.c index 3d8c1f5c..419707e1 100644 --- a/ctf-writer/event-class.c +++ b/src/ctf-writer/event-class.c @@ -24,31 +24,33 @@ #define BT_LOG_TAG "CTF-WRITER-EVENT-CLASS" #include "logging.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include + #include -#include #include -#include -#include +#include #include -#include -#include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include + +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" + +#include "assert-pre.h" +#include "attributes.h" +#include "event-class.h" +#include "event.h" +#include "fields.h" +#include "field-types.h" +#include "stream-class.h" +#include "trace.h" +#include "utils.h" +#include "validation.h" +#include "values.h" +#include "writer.h" BT_HIDDEN void bt_ctf_event_class_common_finalize(struct bt_ctf_object *obj) diff --git a/include/babeltrace2/ctf-writer/event-class-internal.h b/src/ctf-writer/event-class.h similarity index 98% rename from include/babeltrace2/ctf-writer/event-class-internal.h rename to src/ctf-writer/event-class.h index c67184ae..c5ebb85f 100644 --- a/include/babeltrace2/ctf-writer/event-class-internal.h +++ b/src/ctf-writer/event-class.h @@ -25,18 +25,19 @@ * SOFTWARE. */ -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" #include #include #include #include #include -#include -#include -#include #include +#include "object.h" +#include "trace.h" +#include "values.h" + struct bt_ctf_event_class_common { struct bt_ctf_object base; struct bt_ctf_field_type_common *context_field_type; diff --git a/ctf-writer/event.c b/src/ctf-writer/event.c similarity index 97% rename from ctf-writer/event.c rename to src/ctf-writer/event.c index b074cdb1..e1bc85e7 100644 --- a/ctf-writer/event.c +++ b/src/ctf-writer/event.c @@ -24,28 +24,31 @@ #define BT_LOG_TAG "CTF-WRITER-EVENT" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include + #include -#include -#include -#include #include -#include +#include +#include #include -#include -#include #include #include -#include -#include -#include + +#include "common/assert.h" +#include "compat/compiler.h" + +#include "assert-pre.h" +#include "attributes.h" +#include "clock-class.h" +#include "clock.h" +#include "event-class.h" +#include "event.h" +#include "fields.h" +#include "field-types.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" +#include "validation.h" static int bt_ctf_event_common_validate_types_for_create( diff --git a/include/babeltrace2/ctf-writer/event-internal.h b/src/ctf-writer/event.h similarity index 92% rename from include/babeltrace2/ctf-writer/event-internal.h rename to src/ctf-writer/event.h index 97039878..1a8138ab 100644 --- a/include/babeltrace2/ctf-writer/event-internal.h +++ b/src/ctf-writer/event.h @@ -28,22 +28,23 @@ * http://www.efficios.com/ctf */ -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" #include -#include -#include #include #include -#include #include -#include -#include -#include -#include +#include "ctfser/ctfser.h" + +#include "assert-pre.h" +#include "event-class.h" +#include "event.h" +#include "fields.h" +#include "field-wrapper.h" +#include "object.h" +#include "stream.h" +#include "validation.h" +#include "values.h" struct bt_ctf_stream_class; struct bt_ctf_stream_pos; diff --git a/ctf-writer/field-path.c b/src/ctf-writer/field-path.c similarity index 96% rename from ctf-writer/field-path.c rename to src/ctf-writer/field-path.c index 284e850d..dbd817a5 100644 --- a/ctf-writer/field-path.c +++ b/src/ctf-writer/field-path.c @@ -28,15 +28,18 @@ #define BT_LOG_TAG "CTF-WRITER-FIELD-PATH" #include "logging.h" -#include -#include -#include -#include #include #include #include #include +#include + +#include "common/assert.h" + +#include "field-path.h" +#include "field-types.h" + static void field_path_destroy(struct bt_ctf_object *obj) { diff --git a/include/babeltrace2/ctf-writer/field-path-internal.h b/src/ctf-writer/field-path.h similarity index 94% rename from include/babeltrace2/ctf-writer/field-path-internal.h rename to src/ctf-writer/field-path.h index d018e409..cf9edd3f 100644 --- a/include/babeltrace2/ctf-writer/field-path-internal.h +++ b/src/ctf-writer/field-path.h @@ -26,12 +26,13 @@ * http://www.efficios.com/ctf */ -#include -#include -#include +#include "common/common.h" +#include "common/assert.h" #include #include +#include "object.h" + struct bt_ctf_field_path { struct bt_ctf_object base; enum bt_ctf_scope root; diff --git a/ctf-writer/field-types.c b/src/ctf-writer/field-types.c similarity index 99% rename from ctf-writer/field-types.c rename to src/ctf-writer/field-types.c index 2d18c45c..644270a6 100644 --- a/ctf-writer/field-types.c +++ b/src/ctf-writer/field-types.c @@ -25,25 +25,28 @@ #define BT_LOG_TAG "CTF-WRITER-FIELD-TYPES" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include + +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" + +#include "assert-pre.h" +#include "clock-class.h" +#include "clock.h" +#include "field-path.h" +#include "fields.h" +#include "field-types.h" +#include "object.h" +#include "utils.h" + static void destroy_enumeration_mapping(struct bt_ctf_enumeration_mapping *mapping) { diff --git a/include/babeltrace2/ctf-writer/field-types-internal.h b/src/ctf-writer/field-types.h similarity index 98% rename from include/babeltrace2/ctf-writer/field-types-internal.h rename to src/ctf-writer/field-types.h index 757170fa..e1f75fd6 100644 --- a/include/babeltrace2/ctf-writer/field-types-internal.h +++ b/src/ctf-writer/field-types.h @@ -31,14 +31,16 @@ #include #include -#include -#include -#include #include -#include -#include #include +#include "common/babeltrace.h" + +#include "assert-pre.h" +#include "clock-class.h" +#include "object.h" +#include "writer.h" + #define BT_CTF_ASSERT_PRE_CTF_FT_COMMON_HAS_ID(_ft, _type_id, _name) \ BT_CTF_ASSERT_PRE(((struct bt_ctf_field_type_common *) (_ft))->id == (_type_id), \ _name " has the wrong type ID: expected-type-id=%s, " \ diff --git a/ctf-writer/field-wrapper.c b/src/ctf-writer/field-wrapper.c similarity index 92% rename from ctf-writer/field-wrapper.c rename to src/ctf-writer/field-wrapper.c index a5a3b46f..eecd3304 100644 --- a/ctf-writer/field-wrapper.c +++ b/src/ctf-writer/field-wrapper.c @@ -23,12 +23,14 @@ #define BT_LOG_TAG "CTF-WRITER-FIELD-WRAPPER" #include "logging.h" -#include -#include -#include -#include #include +#include "lib/object-pool.h" + +#include "fields.h" +#include "field-wrapper.h" +#include "object.h" + BT_HIDDEN struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_new(void *data) { diff --git a/include/babeltrace2/ctf-writer/field-wrapper-internal.h b/src/ctf-writer/field-wrapper.h similarity index 91% rename from include/babeltrace2/ctf-writer/field-wrapper-internal.h rename to src/ctf-writer/field-wrapper.h index dcdf9684..55aee6cf 100644 --- a/include/babeltrace2/ctf-writer/field-wrapper-internal.h +++ b/src/ctf-writer/field-wrapper.h @@ -23,9 +23,11 @@ * SOFTWARE. */ -#include -#include -#include +#include "common/babeltrace.h" + +#include "fields.h" +#include "object.h" +#include "object-pool.h" struct bt_ctf_field_wrapper { struct bt_ctf_object base; diff --git a/ctf-writer/fields.c b/src/ctf-writer/fields.c similarity index 99% rename from ctf-writer/fields.c rename to src/ctf-writer/fields.c index 327f62e2..832f8f2c 100644 --- a/ctf-writer/fields.c +++ b/src/ctf-writer/fields.c @@ -25,22 +25,24 @@ #define BT_LOG_TAG "CTF-WRITER-FIELDS" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include +#include + +#include "common/align.h" +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" +#include "compat/fcntl.h" +#include "ctfser/ctfser.h" + +#include "assert-pre.h" +#include "fields.h" +#include "field-types.h" +#include "object.h" + #define BT_CTF_ASSERT_PRE_CTF_FIELD_IS_INT_OR_ENUM(_field, _name) \ BT_CTF_ASSERT_PRE((_field)->type->id == BT_CTF_FIELD_TYPE_ID_INTEGER || \ (_field)->type->id == BT_CTF_FIELD_TYPE_ID_ENUM, \ diff --git a/include/babeltrace2/ctf-writer/fields-internal.h b/src/ctf-writer/fields.h similarity index 98% rename from include/babeltrace2/ctf-writer/fields-internal.h rename to src/ctf-writer/fields.h index e9bd3962..b1525e46 100644 --- a/include/babeltrace2/ctf-writer/fields-internal.h +++ b/src/ctf-writer/fields.h @@ -28,24 +28,25 @@ * http://www.efficios.com/ctf */ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include +#include #include #include +#include +#include + +#include "common/babeltrace.h" +#include "common/common.h" +#include "ctfser/ctfser.h" + +#include "assert-pre.h" +#include "field-types.h" +#include "object.h" +#include "utils.h" + #define BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_HAS_TYPE_ID(_field, _type_id, _name) \ BT_CTF_ASSERT_PRE((_field)->type->id == ((int) (_type_id)), \ _name " has the wrong type ID: expected-type-id=%s, " \ @@ -86,7 +87,7 @@ struct bt_ctf_field_common { /* * Specialized data for either CTF IR or CTF writer APIs. - * See comment in `field-types-internal.h` for more details. + * See comment in `field-types.h` for more details. */ union { struct { diff --git a/ctf-writer/functor.c b/src/ctf-writer/functor.c similarity index 93% rename from ctf-writer/functor.c rename to src/ctf-writer/functor.c index e8ad20f8..0b1ecc87 100644 --- a/ctf-writer/functor.c +++ b/src/ctf-writer/functor.c @@ -27,8 +27,9 @@ */ #include -#include -#include + +#include "functor.h" +#include "utils.h" BT_HIDDEN void value_exists(gpointer element, gpointer search_query) diff --git a/include/babeltrace2/ctf-writer/functor-internal.h b/src/ctf-writer/functor.h similarity index 97% rename from include/babeltrace2/ctf-writer/functor-internal.h rename to src/ctf-writer/functor.h index 0d6cda19..628f63ca 100644 --- a/include/babeltrace2/ctf-writer/functor-internal.h +++ b/src/ctf-writer/functor.h @@ -26,7 +26,7 @@ */ #include -#include +#include "common/babeltrace.h" BT_HIDDEN void value_exists(gpointer element, gpointer search_query); diff --git a/ctf-writer/logging.c b/src/ctf-writer/logging.c similarity index 98% rename from ctf-writer/logging.c rename to src/ctf-writer/logging.c index 641d5d99..024d118e 100644 --- a/ctf-writer/logging.c +++ b/src/ctf-writer/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_lib_ctf_writer_log_level -#include "logging.h" +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_lib_ctf_writer_log_level, "BABELTRACE_CTF_WRITER_LOG_LEVEL"); diff --git a/ctf-writer/logging.h b/src/ctf-writer/logging.h similarity index 97% rename from ctf-writer/logging.h rename to src/ctf-writer/logging.h index a6cf543d..8fb722e2 100644 --- a/ctf-writer/logging.h +++ b/src/ctf-writer/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_lib_ctf_writer_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_lib_ctf_writer_log_level); diff --git a/ctf-writer/object-pool.c b/src/ctf-writer/object-pool.c similarity index 96% rename from ctf-writer/object-pool.c rename to src/ctf-writer/object-pool.c index 2d932ac9..831297e7 100644 --- a/ctf-writer/object-pool.c +++ b/src/ctf-writer/object-pool.c @@ -25,8 +25,10 @@ #include "logging.h" #include -#include -#include + +#include "common/assert.h" + +#include "object-pool.h" int bt_ctf_object_pool_initialize(struct bt_ctf_object_pool *pool, bt_ctf_object_pool_new_object_func new_object_func, diff --git a/include/babeltrace2/ctf-writer/object-pool-internal.h b/src/ctf-writer/object-pool.h similarity index 99% rename from include/babeltrace2/ctf-writer/object-pool-internal.h rename to src/ctf-writer/object-pool.h index 1217ef12..c0d8610f 100644 --- a/include/babeltrace2/ctf-writer/object-pool-internal.h +++ b/src/ctf-writer/object-pool.h @@ -50,7 +50,8 @@ */ #include -#include + +#include "object.h" typedef void *(*bt_ctf_object_pool_new_object_func)(void *data); typedef void *(*bt_ctf_object_pool_destroy_object_func)(void *obj, void *data); diff --git a/ctf-writer/object.c b/src/ctf-writer/object.c similarity index 96% rename from ctf-writer/object.c rename to src/ctf-writer/object.c index b6185121..616fcf36 100644 --- a/ctf-writer/object.c +++ b/src/ctf-writer/object.c @@ -20,7 +20,7 @@ * SOFTWARE. */ -#include +#include "object.h" void *bt_ctf_object_get_ref(void *obj) { diff --git a/include/babeltrace2/ctf-writer/object-internal.h b/src/ctf-writer/object.h similarity index 98% rename from include/babeltrace2/ctf-writer/object-internal.h rename to src/ctf-writer/object.h index 365b1126..32317218 100644 --- a/include/babeltrace2/ctf-writer/object-internal.h +++ b/src/ctf-writer/object.h @@ -25,8 +25,8 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include struct bt_ctf_object; diff --git a/ctf-writer/resolve.c b/src/ctf-writer/resolve.c similarity index 99% rename from ctf-writer/resolve.c rename to src/ctf-writer/resolve.c index b0a5e156..6e9e2006 100644 --- a/ctf-writer/resolve.c +++ b/src/ctf-writer/resolve.c @@ -31,21 +31,24 @@ #define BT_LOG_TAG "CTF-WRITER-RESOLVE" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include + +#include "common/babeltrace.h" +#include "common/assert.h" + +#include "field-path.h" +#include "resolve.h" +#include "utils.h" +#include "values.h" + typedef GPtrArray type_stack; /* diff --git a/include/babeltrace2/ctf-writer/resolve-internal.h b/src/ctf-writer/resolve.h similarity index 94% rename from include/babeltrace2/ctf-writer/resolve-internal.h rename to src/ctf-writer/resolve.h index f779238d..f153d1c9 100644 --- a/include/babeltrace2/ctf-writer/resolve-internal.h +++ b/src/ctf-writer/resolve.h @@ -28,11 +28,12 @@ */ #include -#include -#include -#include +#include "common/babeltrace.h" #include +#include "field-types.h" +#include "values.h" + enum bt_ctf_resolve_flag { BT_CTF_RESOLVE_FLAG_PACKET_HEADER = 0x01, BT_CTF_RESOLVE_FLAG_PACKET_CONTEXT = 0x02, diff --git a/ctf-writer/stream-class.c b/src/ctf-writer/stream-class.c similarity index 97% rename from ctf-writer/stream-class.c rename to src/ctf-writer/stream-class.c index 4b61a7ec..8b5e39b4 100644 --- a/ctf-writer/stream-class.c +++ b/src/ctf-writer/stream-class.c @@ -24,30 +24,33 @@ #define BT_LOG_TAG "CTF-WRITER-STREAM-CLASS" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include + +#include "common/align.h" +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" + +#include "assert-pre.h" +#include "clock-class.h" +#include "event-class.h" +#include "event.h" +#include "fields.h" +#include "field-types.h" +#include "field-wrapper.h" +#include "stream-class.h" +#include "utils.h" +#include "validation.h" +#include "visitor.h" +#include "writer.h" + BT_HIDDEN int bt_ctf_stream_class_common_initialize(struct bt_ctf_stream_class_common *stream_class, const char *name, bt_ctf_object_release_func release_func) diff --git a/include/babeltrace2/ctf-writer/stream-class-internal.h b/src/ctf-writer/stream-class.h similarity index 97% rename from include/babeltrace2/ctf-writer/stream-class-internal.h rename to src/ctf-writer/stream-class.h index 0b7fd47d..c008a1fa 100644 --- a/include/babeltrace2/ctf-writer/stream-class-internal.h +++ b/src/ctf-writer/stream-class.h @@ -28,19 +28,20 @@ * http://www.efficios.com/ctf */ -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" +#include "common/common.h" #include -#include -#include -#include #include -#include #include +#include "clock.h" +#include "field-types.h" +#include "object.h" +#include "stream-class.h" +#include "utils.h" +#include "validation.h" + struct bt_ctf_stream_class_common { struct bt_ctf_object base; GString *name; diff --git a/ctf-writer/stream.c b/src/ctf-writer/stream.c similarity index 98% rename from ctf-writer/stream.c rename to src/ctf-writer/stream.c index fc7557ee..a1025c75 100644 --- a/ctf-writer/stream.c +++ b/src/ctf-writer/stream.c @@ -24,26 +24,29 @@ #define BT_LOG_TAG "CTF-WRITER-STREAM" #include "logging.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include + #include -#include -#include +#include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include + +#include "common/align.h" +#include "common/assert.h" +#include "compat/compiler.h" +#include "ctfser/ctfser.h" + +#include "assert-pre.h" +#include "event-class.h" +#include "event.h" +#include "fields.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" +#include "writer.h" BT_HIDDEN void bt_ctf_stream_common_finalize(struct bt_ctf_stream_common *stream) diff --git a/include/babeltrace2/ctf-writer/stream-internal.h b/src/ctf-writer/stream.h similarity index 90% rename from include/babeltrace2/ctf-writer/stream-internal.h rename to src/ctf-writer/stream.h index c7eb9fae..8c3d7d7c 100644 --- a/include/babeltrace2/ctf-writer/stream-internal.h +++ b/src/ctf-writer/stream.h @@ -28,16 +28,17 @@ * http://www.efficios.com/ctf */ -#include -#include -#include -#include +#include "common/assert.h" +#include "common/babeltrace.h" #include -#include -#include -#include +#include "ctfser/ctfser.h" #include +#include "assert-pre.h" +#include "object.h" +#include "stream.h" +#include "utils.h" + struct bt_ctf_stream_common; struct bt_ctf_stream_common { diff --git a/ctf-writer/trace.c b/src/ctf-writer/trace.c similarity index 98% rename from ctf-writer/trace.c rename to src/ctf-writer/trace.c index 8737470c..f2ce7141 100644 --- a/ctf-writer/trace.c +++ b/src/ctf-writer/trace.c @@ -24,34 +24,37 @@ #define BT_LOG_TAG "CTF-WRITER-TRACE" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include + +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" + +#include "attributes.h" +#include "clock-class.h" +#include "clock.h" +#include "event-class.h" +#include "event.h" +#include "field-types.h" +#include "field-wrapper.h" +#include "functor.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" +#include "utils.h" +#include "validation.h" +#include "values.h" +#include "visitor.h" +#include "writer.h" + #define DEFAULT_IDENTIFIER_SIZE 128 #define DEFAULT_METADATA_STRING_SIZE 4096 diff --git a/include/babeltrace2/ctf-writer/trace-internal.h b/src/ctf-writer/trace.h similarity index 95% rename from include/babeltrace2/ctf-writer/trace-internal.h rename to src/ctf-writer/trace.h index 4d3e4d1a..ae5f1ec3 100644 --- a/include/babeltrace2/ctf-writer/trace-internal.h +++ b/src/ctf-writer/trace.h @@ -28,22 +28,23 @@ * http://www.efficios.com/ctf */ -#include -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "compat/uuid.h" #include #include -#include #include -#include -#include -#include #include #include #include +#include "assert-pre.h" +#include "attributes.h" +#include "clock-class.h" +#include "object.h" +#include "stream-class.h" +#include "validation.h" +#include "values.h" + struct bt_ctf_trace_common { struct bt_ctf_object base; GString *name; diff --git a/ctf-writer/utils.c b/src/ctf-writer/utils.c similarity index 95% rename from ctf-writer/utils.c rename to src/ctf-writer/utils.c index fdf0a933..b63883e4 100644 --- a/ctf-writer/utils.c +++ b/src/ctf-writer/utils.c @@ -29,14 +29,17 @@ #define BT_LOG_TAG "CTF-WRITER-UTILS" #include "logging.h" -#include -#include -#include -#include -#include #include #include +#include +#include + +#include "common/assert.h" + +#include "clock-class.h" +#include "field-types.h" + static const char * const reserved_keywords_str[] = {"align", "callsite", "const", "char", "clock", "double", "enum", "env", "event", diff --git a/include/babeltrace2/ctf-writer/utils-internal.h b/src/ctf-writer/utils.h similarity index 98% rename from include/babeltrace2/ctf-writer/utils-internal.h rename to src/ctf-writer/utils.h index d253824c..488251ce 100644 --- a/include/babeltrace2/ctf-writer/utils-internal.h +++ b/src/ctf-writer/utils.h @@ -21,12 +21,13 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include #include #include +#include "field-path.h" + #define BT_CTF_TO_COMMON(_obj) (&(_obj)->common) #define BT_CTF_FROM_COMMON(_obj) ((void *) _obj) diff --git a/ctf-writer/validation.c b/src/ctf-writer/validation.c similarity index 97% rename from ctf-writer/validation.c rename to src/ctf-writer/validation.c index 9c4276eb..1d50d4d6 100644 --- a/ctf-writer/validation.c +++ b/src/ctf-writer/validation.c @@ -27,17 +27,19 @@ #define BT_LOG_TAG "CTF-WRITER-VALIDATION" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include + +#include "common/babeltrace.h" + +#include "assert-pre.h" +#include "event-class.h" +#include "field-types.h" +#include "field-types.h" +#include "resolve.h" +#include "stream-class.h" +#include "trace.h" +#include "validation.h" +#include "values.h" /* * This function resolves and validates the field types of an event diff --git a/include/babeltrace2/ctf-writer/validation-internal.h b/src/ctf-writer/validation.h similarity index 98% rename from include/babeltrace2/ctf-writer/validation-internal.h rename to src/ctf-writer/validation.h index 608078f0..18e6ff7e 100644 --- a/include/babeltrace2/ctf-writer/validation-internal.h +++ b/src/ctf-writer/validation.h @@ -23,8 +23,9 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" + +#include "values.h" struct bt_ctf_trace_common; struct bt_ctf_stream_class_common; diff --git a/ctf-writer/values.c b/src/ctf-writer/values.c similarity index 98% rename from ctf-writer/values.c rename to src/ctf-writer/values.c index dd8ae949..fb5ffa67 100644 --- a/ctf-writer/values.c +++ b/src/ctf-writer/values.c @@ -26,18 +26,19 @@ #include #include -#include #include -#include -#include + #include -#include -#include #include -#include -#include -#include -#include + +#include "common/assert.h" +#include "common/common.h" +#include "compat/compiler.h" +#include "compat/glib.h" + +#include "assert-pre.h" +#include "object.h" +#include "values.h" #define BT_CTF_VALUE_FROM_CONCRETE(_concrete) ((struct bt_ctf_value *) (_concrete)) #define BT_CTF_VALUE_TO_BOOL(_base) ((struct bt_ctf_value_bool *) (_base)) diff --git a/include/babeltrace2/ctf-writer/values-internal.h b/src/ctf-writer/values.h similarity index 99% rename from include/babeltrace2/ctf-writer/values-internal.h rename to src/ctf-writer/values.h index dff46384..b9137ef9 100644 --- a/include/babeltrace2/ctf-writer/values-internal.h +++ b/src/ctf-writer/values.h @@ -24,7 +24,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" struct bt_ctf_value; struct bt_ctf_private_value; diff --git a/ctf-writer/visitor.c b/src/ctf-writer/visitor.c similarity index 97% rename from ctf-writer/visitor.c rename to src/ctf-writer/visitor.c index 707cc7a8..6cb5bab4 100644 --- a/ctf-writer/visitor.c +++ b/src/ctf-writer/visitor.c @@ -26,9 +26,12 @@ * SOFTWARE. */ -#include #include +#include "common/babeltrace.h" + +#include "visitor.h" + BT_HIDDEN int bt_ctf_visitor_helper(struct bt_ctf_visitor_object *root, bt_ctf_child_count_accessor child_counter, diff --git a/include/babeltrace2/ctf-writer/visitor-internal.h b/src/ctf-writer/visitor.h similarity index 97% rename from include/babeltrace2/ctf-writer/visitor-internal.h rename to src/ctf-writer/visitor.h index 810628d1..549285e2 100644 --- a/include/babeltrace2/ctf-writer/visitor-internal.h +++ b/src/ctf-writer/visitor.h @@ -26,7 +26,7 @@ */ #include -#include +#include "common/babeltrace.h" typedef void *(*bt_ctf_child_accessor)(void *object, int index); typedef int64_t (*bt_ctf_child_count_accessor)(void *object); diff --git a/ctf-writer/writer.c b/src/ctf-writer/writer.c similarity index 94% rename from ctf-writer/writer.c rename to src/ctf-writer/writer.c index 949bbea2..6c72acaf 100644 --- a/ctf-writer/writer.c +++ b/src/ctf-writer/writer.c @@ -29,19 +29,6 @@ #define BT_LOG_TAG "CTF-WRITER" #include "logging.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -50,6 +37,22 @@ #include #include +#include + +#include "common/assert.h" +#include "compat/compiler.h" +#include "compat/endian.h" +#include "compat/uuid.h" + +#include "clock.h" +#include "fields.h" +#include "field-types.h" +#include "functor.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" +#include "writer.h" + static void bt_ctf_writer_destroy(struct bt_ctf_object *obj); diff --git a/include/babeltrace2/ctf-writer/writer-internal.h b/src/ctf-writer/writer.h similarity index 95% rename from include/babeltrace2/ctf-writer/writer-internal.h rename to src/ctf-writer/writer.h index 7969513b..37e6a58a 100644 --- a/include/babeltrace2/ctf-writer/writer-internal.h +++ b/src/ctf-writer/writer.h @@ -25,13 +25,16 @@ * SOFTWARE. */ -#include -#include -#include #include +#include #include + #include -#include +#include + +#include "common/babeltrace.h" + +#include "object.h" struct metadata_context { GString *string; diff --git a/ctfser/Makefile.am b/src/ctfser/Makefile.am similarity index 52% rename from ctfser/Makefile.am rename to src/ctfser/Makefile.am index 717621ac..e6ae86f5 100644 --- a/ctfser/Makefile.am +++ b/src/ctfser/Makefile.am @@ -2,4 +2,8 @@ AM_CPPFLAGS += -DINSTALL_LIBDIR=\"$(libdir)\" noinst_LTLIBRARIES = libbabeltrace2-ctfser.la -libbabeltrace2_ctfser_la_SOURCES = ctfser.c logging.c logging.h +libbabeltrace2_ctfser_la_SOURCES = \ + ctfser.c \ + ctfser.h \ + logging.c \ + logging.h diff --git a/ctfser/ctfser.c b/src/ctfser/ctfser.c similarity index 96% rename from ctfser/ctfser.c rename to src/ctfser/ctfser.c index 32cc9d0b..62032469 100644 --- a/ctfser/ctfser.c +++ b/src/ctfser/ctfser.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include @@ -37,11 +37,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/common.h" +#include "ctfser/ctfser.h" +#include "compat/unistd.h" +#include "compat/fcntl.h" static inline uint64_t get_packet_size_increment_bytes(void) diff --git a/include/babeltrace2/ctfser-internal.h b/src/ctfser/ctfser.h similarity index 97% rename from include/babeltrace2/ctfser-internal.h rename to src/ctfser/ctfser.h index 983b86f0..c270faf9 100644 --- a/include/babeltrace2/ctfser-internal.h +++ b/src/ctfser/ctfser.h @@ -31,17 +31,17 @@ #include #include #include -#include +#include "compat/mman.h" #include #include #include -#include -#include -#include -#include +#include "common/align.h" +#include "compat/endian.h" +#include "common/common.h" +#include "common/mmap-align.h" #include -#include -#include +#include "common/assert.h" +#include "compat/bitfield.h" #include struct bt_ctfser { diff --git a/ctfser/logging.c b/src/ctfser/logging.c similarity index 96% rename from ctfser/logging.c rename to src/ctfser/logging.c index 249c3ca0..779078d6 100644 --- a/ctfser/logging.c +++ b/src/ctfser/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_ctfser_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_ctfser_log_level, "BABELTRACE_CTFSER_LOG_LEVEL"); diff --git a/ctfser/logging.h b/src/ctfser/logging.h similarity index 96% rename from ctfser/logging.h rename to src/ctfser/logging.h index f18e7265..547f1ac1 100644 --- a/ctfser/logging.h +++ b/src/ctfser/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_ctfser_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_ctfser_log_level); diff --git a/fd-cache/Makefile.am b/src/fd-cache/Makefile.am similarity index 92% rename from fd-cache/Makefile.am rename to src/fd-cache/Makefile.am index 9bc55df5..c4a12882 100644 --- a/fd-cache/Makefile.am +++ b/src/fd-cache/Makefile.am @@ -4,5 +4,6 @@ noinst_LTLIBRARIES = libbabeltrace2-fd-cache.la libbabeltrace2_fd_cache_la_SOURCES = \ fd-cache.c \ + fd-cache.h \ logging.c \ logging.h diff --git a/fd-cache/fd-cache.c b/src/fd-cache/fd-cache.c similarity index 98% rename from fd-cache/fd-cache.c rename to src/fd-cache/fd-cache.c index fcd4f4c2..6d625189 100644 --- a/fd-cache/fd-cache.c +++ b/src/fd-cache/fd-cache.c @@ -35,8 +35,8 @@ #include #include -#include -#include +#include "common/assert.h" +#include "fd-cache.h" struct file_key { uint64_t dev; diff --git a/include/babeltrace2/fd-cache-internal.h b/src/fd-cache/fd-cache.h similarity index 96% rename from include/babeltrace2/fd-cache-internal.h rename to src/fd-cache/fd-cache.h index 546dcfaa..fb70a076 100644 --- a/include/babeltrace2/fd-cache-internal.h +++ b/src/fd-cache/fd-cache.h @@ -1,7 +1,7 @@ #ifndef BABELTRACE_FD_CACHE_INTERNAL_H #define BABELTRACE_FD_CACHE_INTERNAL_H /* - * fd-cache-internal.h + * fd-cache.h * * Babeltrace - File descriptor cache * @@ -28,7 +28,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" struct bt_fd_cache_handle { int fd; diff --git a/fd-cache/logging.c b/src/fd-cache/logging.c similarity index 96% rename from fd-cache/logging.c rename to src/fd-cache/logging.c index e203ee74..875f3bae 100644 --- a/fd-cache/logging.c +++ b/src/fd-cache/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_fd_cache_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_fd_cache_log_level, "BABELTRACE_FD_CACHE_LOG_LEVEL"); diff --git a/fd-cache/logging.h b/src/fd-cache/logging.h similarity index 96% rename from fd-cache/logging.h rename to src/fd-cache/logging.h index ae851e71..89a783b9 100644 --- a/fd-cache/logging.h +++ b/src/fd-cache/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_fd_cache_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_fd_cache_log_level); diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am new file mode 100644 index 00000000..51da351b --- /dev/null +++ b/src/lib/Makefile.am @@ -0,0 +1,33 @@ +SUBDIRS = trace-ir prio-heap plugin graph + +lib_LTLIBRARIES = libbabeltrace2.la + +libbabeltrace2_la_SOURCES = \ + assert-pre.h \ + babeltrace2.c \ + lib-logging.c \ + lib-logging.h \ + logging.c \ + object.h \ + object-pool.c \ + object-pool.h \ + property.h \ + util.c \ + value.c \ + value.h + +libbabeltrace2_la_LDFLAGS = $(LT_NO_UNDEFINED) \ + -version-info $(BABELTRACE_LIBRARY_VERSION) + +libbabeltrace2_la_LIBADD = \ + prio-heap/libprio-heap.la \ + graph/libgraph.la \ + plugin/libplugin.la \ + trace-ir/libtrace-ir.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/compat/libcompat.la + +if ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT +libbabeltrace2_la_LIBADD += $(top_builddir)/src/python-plugin-provider/libbabeltrace2-python-plugin-provider.la +endif diff --git a/include/babeltrace2/assert-pre-internal.h b/src/lib/assert-pre.h similarity index 90% rename from include/babeltrace2/assert-pre-internal.h rename to src/lib/assert-pre.h index cb503665..6264c8ac 100644 --- a/include/babeltrace2/assert-pre-internal.h +++ b/src/lib/assert-pre.h @@ -26,24 +26,24 @@ /* * The macros in this header use macros defined in - * . We don't want this header to - * automatically include because you + * . We don't want this header to + * automatically include because you * need to manually define BT_LOG_TAG before including - * and it is unexpected that you + * and it is unexpected that you * also need to define it before including this header. * * This is a reminder that in order to use - * , you also need to use logging + * , you also need to use logging * explicitly. */ #ifndef BABELTRACE_LIB_LOGGING_INTERNAL_H -# error Include before this header. +# error Include before this header. #endif #include #include -#include +#include "common/babeltrace.h" #ifdef BT_DEV_MODE /* diff --git a/lib/babeltrace2.c b/src/lib/babeltrace2.c similarity index 100% rename from lib/babeltrace2.c rename to src/lib/babeltrace2.c diff --git a/lib/graph/Makefile.am b/src/lib/graph/Makefile.am similarity index 61% rename from lib/graph/Makefile.am rename to src/lib/graph/Makefile.am index bd373ef7..a7376fb2 100644 --- a/lib/graph/Makefile.am +++ b/src/lib/graph/Makefile.am @@ -4,17 +4,27 @@ noinst_LTLIBRARIES = libgraph.la # Graph library libgraph_la_SOURCES = \ - component-class-sink-colander.c \ + component.c \ component-class.c \ + component-class.h \ + component-class-sink-colander.c \ + component-class-sink-colander.h \ component-filter.c \ + component-filter.h \ + component.h \ component-sink.c \ + component-sink.h \ component-source.c \ - component.c \ + component-source.h \ connection.c \ + connection.h \ graph.c \ + graph.h \ iterator.c \ port.c \ - query-executor.c + port.h \ + query-executor.c \ + query-executor.h libgraph_la_LIBADD = \ message/libgraph-message.la diff --git a/lib/graph/component-class-sink-colander.c b/src/lib/graph/component-class-sink-colander.c similarity index 96% rename from lib/graph/component-class-sink-colander.c rename to src/lib/graph/component-class-sink-colander.c index 6a9d287e..667b997c 100644 --- a/lib/graph/component-class-sink-colander.c +++ b/src/lib/graph/component-class-sink-colander.c @@ -21,19 +21,20 @@ */ #define BT_LOG_TAG "COLANDER" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "lib/object.h" #include #include #include #include #include -#include #include +#include "component-class-sink-colander.h" + static struct bt_component_class_sink *colander_comp_cls; diff --git a/include/babeltrace2/graph/component-class-sink-colander-internal.h b/src/lib/graph/component-class-sink-colander.h similarity index 100% rename from include/babeltrace2/graph/component-class-sink-colander-internal.h rename to src/lib/graph/component-class-sink-colander.h diff --git a/lib/graph/component-class.c b/src/lib/graph/component-class.c similarity index 99% rename from lib/graph/component-class.c rename to src/lib/graph/component-class.c index 4cfc3dc7..87bdb936 100644 --- a/lib/graph/component-class.c +++ b/src/lib/graph/component-class.c @@ -22,11 +22,11 @@ */ #define BT_LOG_TAG "COMP-CLASS" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include #include #include @@ -35,10 +35,11 @@ #include #include #include -#include #include #include +#include "component-class.h" + #define BT_ASSERT_PRE_COMP_CLS_HOT(_cc) \ BT_ASSERT_PRE_HOT(((const struct bt_component_class *) (_cc)), \ "Component class", ": %!+C", (_cc)) diff --git a/include/babeltrace2/graph/component-class-internal.h b/src/lib/graph/component-class.h similarity index 97% rename from include/babeltrace2/graph/component-class-internal.h rename to src/lib/graph/component-class.h index 4e39404f..1c49a769 100644 --- a/include/babeltrace2/graph/component-class-internal.h +++ b/src/lib/graph/component-class.h @@ -31,9 +31,9 @@ #include #include #include -#include -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" +#include "common/list.h" #include #include diff --git a/lib/graph/component-filter.c b/src/lib/graph/component-filter.c similarity index 94% rename from lib/graph/component-filter.c rename to src/lib/graph/component-filter.c index 8c79b638..ab48fb75 100644 --- a/lib/graph/component-filter.c +++ b/src/lib/graph/component-filter.c @@ -22,19 +22,20 @@ */ #define BT_LOG_TAG "COMP-FILTER" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include #include #include -#include -#include -#include #include +#include "component-filter.h" +#include "component.h" +#include "component-class.h" + BT_HIDDEN void bt_component_filter_destroy(struct bt_component *component) { diff --git a/include/babeltrace2/graph/component-filter-internal.h b/src/lib/graph/component-filter.h similarity index 91% rename from include/babeltrace2/graph/component-filter-internal.h rename to src/lib/graph/component-filter.h index 5d4b4a1d..7d5a792e 100644 --- a/include/babeltrace2/graph/component-filter-internal.h +++ b/src/lib/graph/component-filter.h @@ -24,10 +24,11 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include -#include + +#include "component-class.h" +#include "component.h" struct bt_component_filter { struct bt_component parent; diff --git a/lib/graph/component-sink.c b/src/lib/graph/component-sink.c similarity index 94% rename from lib/graph/component-sink.c rename to src/lib/graph/component-sink.c index 1887fbfd..59839245 100644 --- a/lib/graph/component-sink.c +++ b/src/lib/graph/component-sink.c @@ -22,18 +22,19 @@ */ #define BT_LOG_TAG "COMP-SINK" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include #include #include -#include -#include #include +#include "component-sink.h" +#include "component.h" + BT_HIDDEN void bt_component_sink_destroy(struct bt_component *component) { diff --git a/include/babeltrace2/graph/component-sink-internal.h b/src/lib/graph/component-sink.h similarity index 89% rename from include/babeltrace2/graph/component-sink-internal.h rename to src/lib/graph/component-sink.h index d035711d..a6706351 100644 --- a/include/babeltrace2/graph/component-sink-internal.h +++ b/src/lib/graph/component-sink.h @@ -24,11 +24,12 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" +#include "compat/compiler.h" #include -#include -#include + +#include "component-class.h" +#include "component.h" struct bt_component_sink { struct bt_component parent; diff --git a/lib/graph/component-source.c b/src/lib/graph/component-source.c similarity index 91% rename from lib/graph/component-source.c rename to src/lib/graph/component-source.c index 73740cda..c7c01ab1 100644 --- a/lib/graph/component-source.c +++ b/src/lib/graph/component-source.c @@ -22,20 +22,21 @@ */ #define BT_LOG_TAG "COMP-SOURCE" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include #include -#include -#include -#include #include -#include #include +#include "component-source.h" +#include "component.h" +#include "port.h" +#include "message/iterator.h" + BT_HIDDEN void bt_component_source_destroy(struct bt_component *component) { diff --git a/include/babeltrace2/graph/component-source-internal.h b/src/lib/graph/component-source.h similarity index 91% rename from include/babeltrace2/graph/component-source-internal.h rename to src/lib/graph/component-source.h index 9106d8ae..747d760e 100644 --- a/include/babeltrace2/graph/component-source-internal.h +++ b/src/lib/graph/component-source.h @@ -24,9 +24,10 @@ * SOFTWARE. */ -#include -#include -#include +#include "common/babeltrace.h" + +#include "component-class.h" +#include "component.h" struct bt_component_source { struct bt_component parent; diff --git a/lib/graph/component.c b/src/lib/graph/component.c similarity index 96% rename from lib/graph/component.c rename to src/lib/graph/component.c index 6494f648..f4e4be1e 100644 --- a/lib/graph/component.c +++ b/src/lib/graph/component.c @@ -22,32 +22,33 @@ */ #define BT_LOG_TAG "COMP" -#include +#include "lib/lib-logging.h" -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "compat/compiler.h" #include #include -#include +#include "lib/value.h" #include #include +#include "component.h" +#include "component-class.h" +#include "component-source.h" +#include "component-filter.h" +#include "component-sink.h" +#include "connection.h" +#include "graph.h" +#include "message/iterator.h" +#include "port.h" + static struct bt_component * (* const component_create_funcs[])( const struct bt_component_class *) = { diff --git a/include/babeltrace2/graph/component-internal.h b/src/lib/graph/component.h similarity index 95% rename from include/babeltrace2/graph/component-internal.h rename to src/lib/graph/component.h index 13986c87..2753cfe9 100644 --- a/include/babeltrace2/graph/component-internal.h +++ b/src/lib/graph/component.h @@ -24,16 +24,17 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include -#include -#include +#include "lib/object.h" #include -#include +#include "common/assert.h" #include #include +#include "component-class.h" +#include "port.h" + typedef void (*bt_component_destroy_listener_func)( struct bt_component *class, void *data); diff --git a/lib/graph/connection.c b/src/lib/graph/connection.c similarity index 94% rename from lib/graph/connection.c rename to src/lib/graph/connection.c index 00b3a2a7..f76d7158 100644 --- a/lib/graph/connection.c +++ b/src/lib/graph/connection.c @@ -22,21 +22,22 @@ */ #define BT_LOG_TAG "CONNECTION" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include -#include -#include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" #include #include +#include "component.h" +#include "connection.h" +#include "graph.h" +#include "message/iterator.h" +#include "port.h" + static void destroy_connection(struct bt_object *obj) { diff --git a/include/babeltrace2/graph/connection-internal.h b/src/lib/graph/connection.h similarity index 95% rename from include/babeltrace2/graph/connection-internal.h rename to src/lib/graph/connection.h index 8c3dc17f..e6190fa5 100644 --- a/include/babeltrace2/graph/connection-internal.h +++ b/src/lib/graph/connection.h @@ -26,11 +26,12 @@ #include #include -#include -#include -#include +#include "lib/object.h" +#include "common/assert.h" #include +#include "message/iterator.h" + struct bt_graph; struct bt_connection { diff --git a/lib/graph/graph.c b/src/lib/graph/graph.c similarity index 98% rename from lib/graph/graph.c rename to src/lib/graph/graph.c index f7b02a10..4b87d735 100644 --- a/lib/graph/graph.c +++ b/src/lib/graph/graph.c @@ -22,31 +22,32 @@ */ #define BT_LOG_TAG "GRAPH" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include #include -#include -#include -#include #include #include #include -#include -#include -#include -#include -#include +#include "lib/graph/message/message.h" +#include "compat/compiler.h" +#include "common/common.h" #include #include #include -#include +#include "lib/value.h" #include #include +#include "component.h" +#include "component-sink.h" +#include "connection.h" +#include "graph.h" +#include "message/event.h" +#include "message/packet.h" + typedef enum bt_graph_listener_status (*port_added_func_t)( const void *, const void *, void *); diff --git a/include/babeltrace2/graph/graph-internal.h b/src/lib/graph/graph.h similarity index 96% rename from include/babeltrace2/graph/graph-internal.h rename to src/lib/graph/graph.h index dd7374ed..c41d1316 100644 --- a/include/babeltrace2/graph/graph-internal.h +++ b/src/lib/graph/graph.h @@ -25,17 +25,18 @@ */ #include -#include #include -#include -#include -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" +#include "lib/object-pool.h" +#include "common/assert.h" #include #include +#include "component.h" +#include "component-sink.h" +#include "connection.h" + struct bt_component; struct bt_port; diff --git a/lib/graph/iterator.c b/src/lib/graph/iterator.c similarity index 97% rename from lib/graph/iterator.c rename to src/lib/graph/iterator.c index aec91f11..4b876998 100644 --- a/lib/graph/iterator.c +++ b/src/lib/graph/iterator.c @@ -22,54 +22,55 @@ */ #define BT_LOG_TAG "MSG-ITER" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "compat/compiler.h" +#include "lib/trace-ir/clock-class.h" +#include "lib/trace-ir/clock-snapshot.h" #include #include -#include +#include "lib/trace-ir/event.h" #include -#include -#include +#include "lib/trace-ir/packet.h" +#include "lib/trace-ir/stream.h" #include -#include #include -#include -#include -#include -#include #include -#include #include #include -#include #include #include -#include #include -#include #include #include -#include #include #include -#include -#include -#include -#include #include #include #include -#include #include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include #include #include +#include "component-class.h" +#include "component-class-sink-colander.h" +#include "component.h" +#include "component-sink.h" +#include "component-source.h" +#include "connection.h" +#include "graph.h" +#include "message/discarded-items.h" +#include "message/event.h" +#include "message/iterator.h" +#include "message/message.h" +#include "message/message-iterator-inactivity.h" +#include "message/stream.h" +#include "message/packet.h" +#include "message/stream-activity.h" + /* * TODO: Use graph's state (number of active iterators, etc.) and * possibly system specifications to make a better guess than this. diff --git a/lib/graph/message/Makefile.am b/src/lib/graph/message/Makefile.am similarity index 53% rename from lib/graph/message/Makefile.am rename to src/lib/graph/message/Makefile.am index 9c69099f..b0053ceb 100644 --- a/lib/graph/message/Makefile.am +++ b/src/lib/graph/message/Makefile.am @@ -1,10 +1,18 @@ noinst_LTLIBRARIES = libgraph-message.la libgraph_message_la_SOURCES = \ - message.c \ - packet.c \ + discarded-items.c \ + discarded-items.h \ event.c \ - stream.c \ + event.h \ + iterator.h \ + message.c \ + message.h \ message-iterator-inactivity.c \ + message-iterator-inactivity.h \ + packet.c \ + packet.h \ stream-activity.c \ - discarded-items.c + stream-activity.h \ + stream.c \ + stream.h diff --git a/lib/graph/message/discarded-items.c b/src/lib/graph/message/discarded-items.c similarity index 96% rename from lib/graph/message/discarded-items.c rename to src/lib/graph/message/discarded-items.c index 36bdc368..646a7e4f 100644 --- a/lib/graph/message/discarded-items.c +++ b/src/lib/graph/message/discarded-items.c @@ -21,23 +21,24 @@ */ #define BT_LOG_TAG "MSG-DISCARDED-ITEMS" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "lib/assert-pre.h" +#include "lib/object.h" +#include "compat/compiler.h" #include -#include -#include -#include -#include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/trace-ir/stream-class.h" +#include "lib/trace-ir/stream.h" +#include "lib/property.h" +#include "lib/graph/message/message.h" #include #include #include #include +#include "discarded-items.h" + static void destroy_discarded_items_message(struct bt_object *obj) { diff --git a/include/babeltrace2/graph/message-discarded-items-internal.h b/src/lib/graph/message/discarded-items.h similarity index 91% rename from include/babeltrace2/graph/message-discarded-items-internal.h rename to src/lib/graph/message/discarded-items.h index 404a9eef..d9f3fb60 100644 --- a/include/babeltrace2/graph/message-discarded-items-internal.h +++ b/src/lib/graph/message/discarded-items.h @@ -24,11 +24,13 @@ */ #include -#include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/trace-ir/stream.h" +#include "lib/property.h" #include +#include "message.h" + struct bt_message_discarded_items { struct bt_message parent; struct bt_stream *stream; diff --git a/lib/graph/message/event.c b/src/lib/graph/message/event.c similarity index 94% rename from lib/graph/message/event.c rename to src/lib/graph/message/event.c index 7544e33d..00b428c2 100644 --- a/lib/graph/message/event.c +++ b/src/lib/graph/message/event.c @@ -22,26 +22,27 @@ */ #define BT_LOG_TAG "MSG-EVENT" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" +#include "lib/object.h" #include -#include -#include -#include +#include "lib/trace-ir/event.h" +#include "lib/trace-ir/event-class.h" +#include "lib/trace-ir/stream-class.h" #include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/graph/graph.h" #include #include -#include #include #include #include +#include "event.h" + BT_ASSERT_PRE_FUNC static inline bool event_class_has_trace(struct bt_event_class *event_class) { diff --git a/include/babeltrace2/graph/message-event-internal.h b/src/lib/graph/message/event.h similarity index 93% rename from include/babeltrace2/graph/message-event-internal.h rename to src/lib/graph/message/event.h index f8b8946b..b53b6e2f 100644 --- a/include/babeltrace2/graph/message-event-internal.h +++ b/src/lib/graph/message/event.h @@ -24,11 +24,12 @@ * SOFTWARE. */ -#include +#include "compat/compiler.h" #include #include -#include -#include +#include "common/assert.h" + +#include "message.h" #ifdef __cplusplus extern "C" { diff --git a/include/babeltrace2/graph/message-iterator-internal.h b/src/lib/graph/message/iterator.h similarity index 98% rename from include/babeltrace2/graph/message-iterator-internal.h rename to src/lib/graph/message/iterator.h index c6ef7b96..bae41b19 100644 --- a/include/babeltrace2/graph/message-iterator-internal.h +++ b/src/lib/graph/message/iterator.h @@ -24,13 +24,13 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" #include #include #include #include -#include +#include "common/assert.h" #include struct bt_port; diff --git a/lib/graph/message/message-iterator-inactivity.c b/src/lib/graph/message/message-iterator-inactivity.c similarity index 90% rename from lib/graph/message/message-iterator-inactivity.c rename to src/lib/graph/message/message-iterator-inactivity.c index 4cb0a8e0..cfec17ed 100644 --- a/lib/graph/message/message-iterator-inactivity.c +++ b/src/lib/graph/message/message-iterator-inactivity.c @@ -21,17 +21,18 @@ */ #define BT_LOG_TAG "MSG-MESSAGE-ITERATOR-INACTIVITY" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "lib/assert-pre.h" +#include "lib/object.h" +#include "compat/compiler.h" #include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/graph/message/message.h" #include #include -#include + +#include "message-iterator-inactivity.h" static void bt_message_message_iterator_inactivity_destroy(struct bt_object *obj) diff --git a/include/babeltrace2/graph/message-message-iterator-inactivity-internal.h b/src/lib/graph/message/message-iterator-inactivity.h similarity index 96% rename from include/babeltrace2/graph/message-message-iterator-inactivity-internal.h rename to src/lib/graph/message/message-iterator-inactivity.h index 5e607e29..12806bfb 100644 --- a/include/babeltrace2/graph/message-message-iterator-inactivity-internal.h +++ b/src/lib/graph/message/message-iterator-inactivity.h @@ -24,7 +24,7 @@ */ #include -#include +#include "lib/trace-ir/clock-snapshot.h" #include struct bt_message_message_iterator_inactivity { diff --git a/lib/graph/message/message.c b/src/lib/graph/message/message.c similarity index 90% rename from lib/graph/message/message.c rename to src/lib/graph/message/message.c index 7cdd3d37..0a65b3be 100644 --- a/lib/graph/message/message.c +++ b/src/lib/graph/message/message.c @@ -22,13 +22,13 @@ */ #define BT_LOG_TAG "MSG" -#include +#include "lib/lib-logging.h" -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include -#include -#include +#include "lib/graph/message/message.h" +#include "lib/graph/graph.h" BT_HIDDEN void bt_message_init(struct bt_message *message, diff --git a/include/babeltrace2/graph/message-internal.h b/src/lib/graph/message/message.h similarity index 95% rename from include/babeltrace2/graph/message-internal.h rename to src/lib/graph/message/message.h index 28c66168..98437707 100644 --- a/include/babeltrace2/graph/message-internal.h +++ b/src/lib/graph/message/message.h @@ -24,13 +24,13 @@ * SOFTWARE. */ -#include -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" +#include "common/assert.h" #include #include #include -#include +#include "lib/object-pool.h" #include typedef struct bt_stream *(*get_stream_func)( diff --git a/lib/graph/message/packet.c b/src/lib/graph/message/packet.c similarity index 95% rename from lib/graph/message/packet.c rename to src/lib/graph/message/packet.c index 9ed9a0c4..6bce7129 100644 --- a/lib/graph/message/packet.c +++ b/src/lib/graph/message/packet.c @@ -22,26 +22,27 @@ */ #define BT_LOG_TAG "MSG-PACKET" -#include +#include "lib/lib-logging.h" -#include +#include "compat/compiler.h" #include -#include +#include "lib/trace-ir/packet.h" #include #include -#include -#include -#include +#include "lib/trace-ir/stream.h" +#include "lib/trace-ir/stream-class.h" +#include "lib/graph/graph.h" #include #include #include #include -#include -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "lib/object.h" #include +#include "packet.h" + static inline struct bt_message *new_packet_message(struct bt_graph *graph, enum bt_message_type type, bt_object_release_func recycle_func) diff --git a/include/babeltrace2/graph/message-packet-internal.h b/src/lib/graph/message/packet.h similarity index 91% rename from include/babeltrace2/graph/message-packet-internal.h rename to src/lib/graph/message/packet.h index 6e532bce..7738788c 100644 --- a/include/babeltrace2/graph/message-packet-internal.h +++ b/src/lib/graph/message/packet.h @@ -24,11 +24,12 @@ * SOFTWARE. */ -#include +#include "compat/compiler.h" #include -#include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "common/assert.h" + +#include "message.h" struct bt_message_packet { struct bt_message parent; diff --git a/lib/graph/message/stream-activity.c b/src/lib/graph/message/stream-activity.c similarity index 95% rename from lib/graph/message/stream-activity.c rename to src/lib/graph/message/stream-activity.c index 7ecbd461..dc840bea 100644 --- a/lib/graph/message/stream-activity.c +++ b/src/lib/graph/message/stream-activity.c @@ -21,21 +21,22 @@ */ #define BT_LOG_TAG "MSG-STREAM-ACTIVITY" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "lib/assert-pre.h" +#include "lib/object.h" +#include "compat/compiler.h" #include -#include -#include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/trace-ir/stream-class.h" +#include "lib/trace-ir/stream.h" +#include "lib/graph/message/message.h" #include #include #include #include -#include + +#include "stream-activity.h" static void destroy_stream_activity_message(struct bt_object *obj) diff --git a/include/babeltrace2/graph/message-stream-activity-internal.h b/src/lib/graph/message/stream-activity.h similarity index 95% rename from include/babeltrace2/graph/message-stream-activity-internal.h rename to src/lib/graph/message/stream-activity.h index 8298b0c7..9199d43b 100644 --- a/include/babeltrace2/graph/message-stream-activity-internal.h +++ b/src/lib/graph/message/stream-activity.h @@ -24,8 +24,8 @@ */ #include -#include -#include +#include "lib/trace-ir/clock-snapshot.h" +#include "lib/trace-ir/stream.h" #include #include diff --git a/lib/graph/message/stream.c b/src/lib/graph/message/stream.c similarity index 93% rename from lib/graph/message/stream.c rename to src/lib/graph/message/stream.c index 935942a7..f691d72b 100644 --- a/lib/graph/message/stream.c +++ b/src/lib/graph/message/stream.c @@ -22,22 +22,23 @@ */ #define BT_LOG_TAG "MSG-STREAM" -#include +#include "lib/lib-logging.h" -#include -#include +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include -#include +#include "lib/trace-ir/stream.h" #include -#include +#include "lib/trace-ir/stream-class.h" #include #include #include #include -#include -#include +#include "common/assert.h" #include +#include "stream.h" + static void destroy_stream_message(struct bt_object *obj) { diff --git a/include/babeltrace2/graph/message-stream-internal.h b/src/lib/graph/message/stream.h similarity index 85% rename from include/babeltrace2/graph/message-stream-internal.h rename to src/lib/graph/message/stream.h index 54beef6c..7cca4bc2 100644 --- a/include/babeltrace2/graph/message-stream-internal.h +++ b/src/lib/graph/message/stream.h @@ -24,11 +24,12 @@ * SOFTWARE. */ -#include -#include -#include -#include -#include +#include "compat/compiler.h" +#include "lib/trace-ir/stream.h" +#include "lib/trace-ir/clock-snapshot.h" +#include "common/assert.h" + +#include "message.h" struct bt_message_stream { struct bt_message parent; diff --git a/lib/graph/port.c b/src/lib/graph/port.c similarity index 93% rename from lib/graph/port.c rename to src/lib/graph/port.c index f119d60b..ff4e4430 100644 --- a/lib/graph/port.c +++ b/src/lib/graph/port.c @@ -22,21 +22,22 @@ */ #define BT_LOG_TAG "PORT" -#include +#include "lib/lib-logging.h" -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include #include #include #include #include #include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" + +#include "component.h" +#include "connection.h" +#include "port.h" static void destroy_port(struct bt_object *obj) diff --git a/include/babeltrace2/graph/port-internal.h b/src/lib/graph/port.h similarity index 100% rename from include/babeltrace2/graph/port-internal.h rename to src/lib/graph/port.h diff --git a/lib/graph/query-executor.c b/src/lib/graph/query-executor.c similarity index 93% rename from lib/graph/query-executor.c rename to src/lib/graph/query-executor.c index 5c8e33e1..b26455d4 100644 --- a/lib/graph/query-executor.c +++ b/src/lib/graph/query-executor.c @@ -21,19 +21,20 @@ */ #define BT_LOG_TAG "QUERY-EXECUTOR" -#include +#include "lib/lib-logging.h" -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" #include #include -#include #include -#include #include #include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" + +#include "component-class.h" +#include "query-executor.h" static void bt_query_executor_destroy(struct bt_object *obj) diff --git a/include/babeltrace2/graph/query-executor-internal.h b/src/lib/graph/query-executor.h similarity index 98% rename from include/babeltrace2/graph/query-executor-internal.h rename to src/lib/graph/query-executor.h index 2bf9367b..57951b72 100644 --- a/include/babeltrace2/graph/query-executor-internal.h +++ b/src/lib/graph/query-executor.h @@ -24,7 +24,7 @@ */ #include -#include +#include "lib/object.h" #include #include diff --git a/lib/lib-logging.c b/src/lib/lib-logging.c similarity index 94% rename from lib/lib-logging.c rename to src/lib/lib-logging.c index 8b16a011..d6d75e05 100644 --- a/lib/lib-logging.c +++ b/src/lib/lib-logging.c @@ -30,48 +30,48 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "common/common.h" +#include "lib/value.h" +#include "lib/value.h" +#include "lib/object-pool.h" #include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "graph/component-class.h" +#include "graph/component-class-sink-colander.h" +#include "graph/component-filter.h" +#include "graph/component.h" +#include "graph/component-sink.h" +#include "graph/component-source.h" +#include "graph/connection.h" +#include "graph/graph.h" +#include "graph/message/discarded-items.h" +#include "graph/message/event.h" +#include "graph/message/iterator.h" +#include "graph/message/message.h" +#include "graph/message/message-iterator-inactivity.h" +#include "graph/message/packet.h" +#include "graph/message/stream-activity.h" +#include "graph/message/stream.h" +#include "graph/port.h" +#include "lib-logging.h" +#include "plugin/plugin.h" +#include "plugin/plugin-so.h" +#include "trace-ir/clock-class.h" +#include "trace-ir/clock-snapshot.h" +#include "trace-ir/event-class.h" +#include "trace-ir/event.h" +#include "trace-ir/field-class.h" +#include "trace-ir/field.h" +#include "trace-ir/field-path.h" +#include "trace-ir/packet.h" +#include "trace-ir/stream-class.h" +#include "trace-ir/stream.h" +#include "trace-ir/trace-class.h" +#include "trace-ir/trace.h" +#include "trace-ir/utils.h" +#include "assert-pre.h" #define LIB_LOGGING_BUF_SIZE (4096 * 4) diff --git a/include/babeltrace2/lib-logging-internal.h b/src/lib/lib-logging.h similarity index 98% rename from include/babeltrace2/lib-logging-internal.h rename to src/lib/lib-logging.h index 3b12756d..59e85591 100644 --- a/include/babeltrace2/lib-logging-internal.h +++ b/src/lib/lib-logging.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include #ifndef BT_LOG_TAG @@ -32,7 +32,7 @@ #define BT_LOG_OUTPUT_LEVEL bt_lib_log_level -#include +#include "logging/log.h" extern int bt_lib_log_level; diff --git a/lib/logging.c b/src/lib/logging.c similarity index 98% rename from lib/logging.c rename to src/lib/logging.c index 7ebb52c0..3c0178c2 100644 --- a/lib/logging.c +++ b/src/lib/logging.c @@ -25,7 +25,7 @@ #include #define BT_LOG_TAG "LIB" -#include +#include "lib/lib-logging.h" #ifdef BT_DEV_MODE /* diff --git a/lib/object-pool.c b/src/lib/object-pool.c similarity index 92% rename from lib/object-pool.c rename to src/lib/object-pool.c index 8cdf98c7..2542047a 100644 --- a/lib/object-pool.c +++ b/src/lib/object-pool.c @@ -21,12 +21,12 @@ */ #define BT_LOG_TAG "OBJECT-POOL" -#include +#include "lib/lib-logging.h" #include -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "lib/object-pool.h" int bt_object_pool_initialize(struct bt_object_pool *pool, bt_object_pool_new_object_func new_object_func, diff --git a/include/babeltrace2/object-pool-internal.h b/src/lib/object-pool.h similarity index 99% rename from include/babeltrace2/object-pool-internal.h rename to src/lib/object-pool.h index 5a99f962..eb7833fd 100644 --- a/include/babeltrace2/object-pool-internal.h +++ b/src/lib/object-pool.h @@ -49,7 +49,7 @@ */ #include -#include +#include "lib/object.h" typedef void *(*bt_object_pool_new_object_func)(void *data); typedef void *(*bt_object_pool_destroy_object_func)(void *obj, void *data); diff --git a/include/babeltrace2/object-internal.h b/src/lib/object.h similarity index 99% rename from include/babeltrace2/object-internal.h rename to src/lib/object.h index 9573fb27..c3afd73f 100644 --- a/include/babeltrace2/object-internal.h +++ b/src/lib/object.h @@ -24,8 +24,8 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include struct bt_object; diff --git a/lib/plugin/Makefile.am b/src/lib/plugin/Makefile.am similarity index 70% rename from lib/plugin/Makefile.am rename to src/lib/plugin/Makefile.am index bf8afa21..d3133dd8 100644 --- a/lib/plugin/Makefile.am +++ b/src/lib/plugin/Makefile.am @@ -3,4 +3,6 @@ noinst_LTLIBRARIES = libplugin.la # Plug-in system library libplugin_la_SOURCES = \ plugin.c \ - plugin-so.c + plugin.h \ + plugin-so.c \ + plugin-so.h diff --git a/lib/plugin/plugin-so.c b/src/lib/plugin/plugin-so.c similarity index 99% rename from lib/plugin/plugin-so.c rename to src/lib/plugin/plugin-so.c index ec69646f..621353c0 100644 --- a/lib/plugin/plugin-so.c +++ b/src/lib/plugin/plugin-so.c @@ -24,27 +24,27 @@ */ #define BT_LOG_TAG "PLUGIN-SO" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "compat/compiler.h" #include -#include -#include +#include "lib/graph/component-class.h" #include #include #include #include #include -#include +#include "common/list.h" #include #include #include #include +#include "plugin.h" +#include "plugin-so.h" + #define NATIVE_PLUGIN_SUFFIX "." G_MODULE_SUFFIX #define NATIVE_PLUGIN_SUFFIX_LEN sizeof(NATIVE_PLUGIN_SUFFIX) #define LIBTOOL_PLUGIN_SUFFIX ".la" diff --git a/include/babeltrace2/plugin/plugin-so-internal.h b/src/lib/plugin/plugin-so.h similarity index 100% rename from include/babeltrace2/plugin/plugin-so-internal.h rename to src/lib/plugin/plugin-so.h diff --git a/lib/plugin/plugin.c b/src/lib/plugin/plugin.c similarity index 97% rename from lib/plugin/plugin.c rename to src/lib/plugin/plugin.c index a6e9806d..53b783ff 100644 --- a/lib/plugin/plugin.c +++ b/src/lib/plugin/plugin.c @@ -24,18 +24,16 @@ */ #define BT_LOG_TAG "PLUGIN" -#include - -#include -#include -#include -#include -#include -#include -#include +#include "lib/lib-logging.h" + +#include "common/assert.h" +#include "lib/assert-pre.h" +#include "common/babeltrace.h" +#include "compat/compiler.h" +#include "common/common.h" #include #include -#include +#include "lib/graph/component-class.h" #include #include #include @@ -46,6 +44,9 @@ #include #include +#include "plugin.h" +#include "plugin-so.h" + #define PYTHON_PLUGIN_PROVIDER_FILENAME "libbabeltrace2-python-plugin-provider." G_MODULE_SUFFIX #define PYTHON_PLUGIN_PROVIDER_SYM_NAME bt_plugin_python_create_all_from_file #define PYTHON_PLUGIN_PROVIDER_SYM_NAME_STR TOSTRING(PYTHON_PLUGIN_PROVIDER_SYM_NAME) @@ -53,7 +54,7 @@ #define APPEND_ALL_FROM_DIR_NFDOPEN_MAX 8 #ifdef BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT -#include +#include static struct bt_plugin_set *(*bt_plugin_python_create_all_from_file_sym)(const char *path) = diff --git a/include/babeltrace2/plugin/plugin-internal.h b/src/lib/plugin/plugin.h similarity index 97% rename from include/babeltrace2/plugin/plugin-internal.h rename to src/lib/plugin/plugin.h index f2a78fe4..cdd20d69 100644 --- a/include/babeltrace2/plugin/plugin-internal.h +++ b/src/lib/plugin/plugin.h @@ -24,17 +24,18 @@ * SOFTWARE. */ -#include -#include +#include "common/babeltrace.h" +#include "lib/graph/component-class.h" #include #include -#include -#include +#include "lib/object.h" #include -#include -#include +#include "common/assert.h" +#include "lib/lib-logging.h" #include +#include "plugin-so.h" + enum bt_plugin_type { BT_PLUGIN_TYPE_SO = 0, BT_PLUGIN_TYPE_PYTHON = 1, diff --git a/src/lib/prio-heap/Makefile.am b/src/lib/prio-heap/Makefile.am new file mode 100644 index 00000000..c7a54d4d --- /dev/null +++ b/src/lib/prio-heap/Makefile.am @@ -0,0 +1,5 @@ +noinst_LTLIBRARIES = libprio-heap.la + +libprio_heap_la_SOURCES = \ + prio-heap.c \ + prio-heap.h diff --git a/lib/prio_heap/prio_heap.c b/src/lib/prio-heap/prio-heap.c similarity index 97% rename from lib/prio_heap/prio_heap.c rename to src/lib/prio-heap/prio-heap.c index 97a69ac4..29e90688 100644 --- a/lib/prio_heap/prio_heap.c +++ b/src/lib/prio-heap/prio-heap.c @@ -23,13 +23,14 @@ * SOFTWARE. */ -#include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include +#include "prio-heap.h" + #ifdef DEBUG_HEAP void check_heap(const struct ptr_heap *heap) { diff --git a/include/babeltrace2/prio-heap-internal.h b/src/lib/prio-heap/prio-heap.h similarity index 98% rename from include/babeltrace2/prio-heap-internal.h rename to src/lib/prio-heap/prio-heap.h index e6c6a1a3..8ea51bc1 100644 --- a/include/babeltrace2/prio-heap-internal.h +++ b/src/lib/prio-heap/prio-heap.h @@ -27,7 +27,7 @@ */ #include -#include +#include "common/babeltrace.h" struct ptr_heap { size_t len, alloc_len; diff --git a/include/babeltrace2/property-internal.h b/src/lib/property.h similarity index 97% rename from include/babeltrace2/property-internal.h rename to src/lib/property.h index 575bf6ee..9bc3f482 100644 --- a/include/babeltrace2/property-internal.h +++ b/src/lib/property.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include +#include "common/assert.h" #include #include #include diff --git a/lib/trace-ir/Makefile.am b/src/lib/trace-ir/Makefile.am similarity index 56% rename from lib/trace-ir/Makefile.am rename to src/lib/trace-ir/Makefile.am index 0b2107e0..159f4b4a 100644 --- a/lib/trace-ir/Makefile.am +++ b/src/lib/trace-ir/Makefile.am @@ -2,21 +2,38 @@ noinst_LTLIBRARIES = libtrace-ir.la libtrace_ir_la_SOURCES = \ attributes.c \ + attributes.h \ clock-class.c \ + clock-class.h \ clock-snapshot.c \ + clock-snapshot.h \ + clock-snapshot-set.h \ event.c \ event-class.c \ - field-wrapper.c \ + event-class.h \ + event.h \ field.c \ field-class.c \ + field-class.h \ + field.h \ field-path.c \ + field-path.h \ + field-wrapper.c \ + field-wrapper.h \ packet.c \ packet-context-field.c \ + packet.h \ resolve-field-path.c \ + resolve-field-path.h \ stream.c \ stream-class.c \ + stream-class.h \ + stream.h \ trace.c \ trace-class.c \ - utils.c + trace-class.h \ + trace.h \ + utils.c \ + utils.h libtrace_ir_la_LIBADD = $(UUID_LIBS) diff --git a/lib/trace-ir/attributes.c b/src/lib/trace-ir/attributes.c similarity index 96% rename from lib/trace-ir/attributes.c rename to src/lib/trace-ir/attributes.c index 8e85af5c..7d20c1e5 100644 --- a/lib/trace-ir/attributes.c +++ b/src/lib/trace-ir/attributes.c @@ -22,18 +22,18 @@ */ #define BT_LOG_TAG "ATTRS" -#include +#include "lib/lib-logging.h" -#include +#include "common/babeltrace.h" #include -#include -#include +#include "lib/assert-pre.h" +#include "lib/object.h" #include -#include -#include +#include "lib/value.h" +#include "attributes.h" #include -#include -#include +#include "compat/string.h" +#include "common/assert.h" #define BT_ATTR_NAME_INDEX 0 #define BT_ATTR_VALUE_INDEX 1 diff --git a/include/babeltrace2/trace-ir/attributes-internal.h b/src/lib/trace-ir/attributes.h similarity index 97% rename from include/babeltrace2/trace-ir/attributes-internal.h rename to src/lib/trace-ir/attributes.h index 1784b35f..e493815c 100644 --- a/include/babeltrace2/trace-ir/attributes-internal.h +++ b/src/lib/trace-ir/attributes.h @@ -29,7 +29,7 @@ extern "C" { #endif #include -#include +#include "common/babeltrace.h" #include BT_HIDDEN diff --git a/lib/trace-ir/clock-class.c b/src/lib/trace-ir/clock-class.c similarity index 95% rename from lib/trace-ir/clock-class.c rename to src/lib/trace-ir/clock-class.c index 515cdb4f..46fa7332 100644 --- a/lib/trace-ir/clock-class.c +++ b/src/lib/trace-ir/clock-class.c @@ -22,21 +22,21 @@ */ #define BT_LOG_TAG "CLOCK-CLASS" -#include +#include "lib/lib-logging.h" -#include -#include +#include "lib/assert-pre.h" +#include "compat/uuid.h" #include #include -#include -#include -#include -#include +#include "clock-class.h" +#include "clock-snapshot.h" +#include "utils.h" +#include "compat/compiler.h" #include -#include +#include "compat/string.h" #include -#include -#include +#include "lib/object.h" +#include "common/assert.h" #define BT_ASSERT_PRE_CLOCK_CLASS_HOT(_cc) \ BT_ASSERT_PRE_HOT((_cc), "Clock class", ": %!+K", (_cc)) diff --git a/include/babeltrace2/trace-ir/clock-class-internal.h b/src/lib/trace-ir/clock-class.h similarity index 91% rename from include/babeltrace2/trace-ir/clock-class-internal.h rename to src/lib/trace-ir/clock-class.h index 7b748305..e6e57e90 100644 --- a/include/babeltrace2/trace-ir/clock-class-internal.h +++ b/src/lib/trace-ir/clock-class.h @@ -25,14 +25,14 @@ */ #include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "common/babeltrace.h" +#include "common/common.h" +#include "lib/object-pool.h" +#include "compat/uuid.h" #include -#include -#include +#include "lib/property.h" +#include "common/assert.h" #include #include #include diff --git a/include/babeltrace2/trace-ir/clock-snapshot-set-internal.h b/src/lib/trace-ir/clock-snapshot-set.h similarity index 96% rename from include/babeltrace2/trace-ir/clock-snapshot-set-internal.h rename to src/lib/trace-ir/clock-snapshot-set.h index 59e51b82..0ad92809 100644 --- a/include/babeltrace2/trace-ir/clock-snapshot-set-internal.h +++ b/src/lib/trace-ir/clock-snapshot-set.h @@ -25,9 +25,10 @@ #include #include -#include -#include -#include +#include "common/assert.h" + +#include "clock-snapshot.h" +#include "clock-class.h" struct bt_clock_snapshot_set { /* Unique objects owned by this */ diff --git a/lib/trace-ir/clock-snapshot.c b/src/lib/trace-ir/clock-snapshot.c similarity index 92% rename from lib/trace-ir/clock-snapshot.c rename to src/lib/trace-ir/clock-snapshot.c index 050f82ac..04ef345e 100644 --- a/lib/trace-ir/clock-snapshot.c +++ b/src/lib/trace-ir/clock-snapshot.c @@ -21,19 +21,19 @@ */ #define BT_LOG_TAG "CLOCK-SNAPSHOT" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include +#include "lib/assert-pre.h" +#include "compat/uuid.h" +#include "clock-class.h" +#include "clock-snapshot.h" #include -#include +#include "compat/compiler.h" #include -#include +#include "compat/string.h" #include -#include -#include +#include "lib/object.h" +#include "common/assert.h" BT_HIDDEN void bt_clock_snapshot_destroy(struct bt_clock_snapshot *clock_snapshot) diff --git a/include/babeltrace2/trace-ir/clock-snapshot-internal.h b/src/lib/trace-ir/clock-snapshot.h similarity index 93% rename from include/babeltrace2/trace-ir/clock-snapshot-internal.h rename to src/lib/trace-ir/clock-snapshot.h index 049d7fdd..5375f3ab 100644 --- a/include/babeltrace2/trace-ir/clock-snapshot-internal.h +++ b/src/lib/trace-ir/clock-snapshot.h @@ -23,13 +23,14 @@ * SOFTWARE. */ -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" #include #include +#include "clock-class.h" +#include "utils.h" + struct bt_clock_class; struct bt_clock_snapshot { diff --git a/lib/trace-ir/event-class.c b/src/lib/trace-ir/event-class.c similarity index 93% rename from lib/trace-ir/event-class.c rename to src/lib/trace-ir/event-class.c index db3911a0..e4676638 100644 --- a/lib/trace-ir/event-class.c +++ b/src/lib/trace-ir/event-class.c @@ -22,31 +22,32 @@ */ #define BT_LOG_TAG "EVENT-CLASS" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "lib/assert-pre.h" #include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include +#include "compat/compiler.h" +#include "compat/endian.h" #include -#include -#include +#include "lib/value.h" +#include "common/assert.h" #include #include +#include "attributes.h" +#include "clock-snapshot.h" +#include "event-class.h" +#include "event.h" +#include "field-class.h" +#include "field.h" +#include "resolve-field-path.h" +#include "stream-class.h" +#include "trace.h" +#include "utils.h" + #define BT_ASSERT_PRE_EVENT_CLASS_HOT(_ec) \ BT_ASSERT_PRE_HOT(((const struct bt_event_class *) (_ec)), \ "Event class", ": %!+E", (_ec)) diff --git a/include/babeltrace2/trace-ir/event-class-internal.h b/src/lib/trace-ir/event-class.h similarity index 89% rename from include/babeltrace2/trace-ir/event-class-internal.h rename to src/lib/trace-ir/event-class.h index 5d673a93..b368a286 100644 --- a/include/babeltrace2/trace-ir/event-class-internal.h +++ b/src/lib/trace-ir/event-class.h @@ -24,22 +24,23 @@ * SOFTWARE. */ -#include +#include "lib/assert-pre.h" #include #include -#include +#include "common/babeltrace.h" #include -#include #include #include #include -#include -#include -#include -#include +#include "lib/object.h" +#include "common/assert.h" +#include "lib/object-pool.h" +#include "lib/property.h" #include #include +#include "trace.h" + struct bt_event_class { struct bt_object base; struct bt_field_class *specific_context_fc; diff --git a/lib/trace-ir/event.c b/src/lib/trace-ir/event.c similarity index 90% rename from lib/trace-ir/event.c rename to src/lib/trace-ir/event.c index 5f094856..133d0d2a 100644 --- a/lib/trace-ir/event.c +++ b/src/lib/trace-ir/event.c @@ -22,29 +22,30 @@ */ #define BT_LOG_TAG "EVENT" -#include +#include "lib/lib-logging.h" -#include -#include -#include +#include "lib/assert-pre.h" #include -#include #include -#include #include #include -#include -#include #include -#include #include -#include -#include -#include -#include -#include +#include "common/assert.h" +#include "compat/compiler.h" #include +#include "field.h" +#include "field-class.h" +#include "event.h" +#include "stream-class.h" +#include "stream.h" +#include "packet.h" +#include "trace.h" +#include "packet.h" +#include "attributes.h" +#include "event-class.h" + BT_HIDDEN void _bt_event_set_is_frozen(const struct bt_event *event, bool is_frozen) { diff --git a/include/babeltrace2/trace-ir/event-internal.h b/src/lib/trace-ir/event.h similarity index 91% rename from include/babeltrace2/trace-ir/event-internal.h rename to src/lib/trace-ir/event.h index 46533e86..308c451e 100644 --- a/include/babeltrace2/trace-ir/event-internal.h +++ b/src/lib/trace-ir/event.h @@ -26,25 +26,26 @@ /* Protection: this file uses BT_LIB_LOG*() macros directly */ #ifndef BABELTRACE_LIB_LOGGING_INTERNAL_H -# error Please define include before including this file. +# error Please include before including this file. #endif -#include -#include +#include "lib/assert-pre.h" +#include "common/babeltrace.h" #include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "common/assert.h" #include +#include "event-class.h" +#include "field.h" +#include "field-wrapper.h" +#include "packet.h" +#include "stream.h" + #define BT_ASSERT_PRE_EVENT_HOT(_event) \ BT_ASSERT_PRE_HOT(((const struct bt_event *) (_event)), \ "Event", ": %!+e", (_event)) diff --git a/lib/trace-ir/field-class.c b/src/lib/trace-ir/field-class.c similarity index 98% rename from lib/trace-ir/field-class.c rename to src/lib/trace-ir/field-class.c index c1f18058..40fe2159 100644 --- a/lib/trace-ir/field-class.c +++ b/src/lib/trace-ir/field-class.c @@ -22,28 +22,29 @@ */ #define BT_LOG_TAG "FIELD-CLASSES" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include #include -#include -#include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" +#include "compat/endian.h" +#include "common/assert.h" +#include "compat/glib.h" #include #include #include +#include "clock-class.h" +#include "field-class.h" +#include "field.h" +#include "field-path.h" +#include "utils.h" + enum bt_field_class_type bt_field_class_get_type( const struct bt_field_class *fc) { diff --git a/include/babeltrace2/trace-ir/field-class-internal.h b/src/lib/trace-ir/field-class.h similarity index 98% rename from include/babeltrace2/trace-ir/field-class-internal.h rename to src/lib/trace-ir/field-class.h index b6ba7291..b5692dae 100644 --- a/include/babeltrace2/trace-ir/field-class-internal.h +++ b/src/lib/trace-ir/field-class.h @@ -24,11 +24,11 @@ * SOFTWARE. */ -#include +#include "lib/assert-pre.h" #include #include -#include -#include +#include "common/babeltrace.h" +#include "lib/object.h" #include #include #include diff --git a/lib/trace-ir/field-path.c b/src/lib/trace-ir/field-path.c similarity index 94% rename from lib/trace-ir/field-path.c rename to src/lib/trace-ir/field-path.c index 23b65a75..d43cc5b1 100644 --- a/lib/trace-ir/field-path.c +++ b/src/lib/trace-ir/field-path.c @@ -22,19 +22,20 @@ */ #define BT_LOG_TAG "FIELD-PATH" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include -#include -#include #include #include #include #include -#include +#include "common/assert.h" #include +#include "field-class.h" +#include "field-path.h" + static void destroy_field_path(struct bt_object *obj) { diff --git a/include/babeltrace2/trace-ir/field-path-internal.h b/src/lib/trace-ir/field-path.h similarity index 97% rename from include/babeltrace2/trace-ir/field-path-internal.h rename to src/lib/trace-ir/field-path.h index ef98835a..506c0063 100644 --- a/include/babeltrace2/trace-ir/field-path-internal.h +++ b/src/lib/trace-ir/field-path.h @@ -26,9 +26,9 @@ * http://www.efficios.com/ctf */ -#include +#include "lib/object.h" #include -#include +#include "common/assert.h" #include struct bt_field_path_item { diff --git a/lib/trace-ir/field-wrapper.c b/src/lib/trace-ir/field-wrapper.c similarity index 92% rename from lib/trace-ir/field-wrapper.c rename to src/lib/trace-ir/field-wrapper.c index 8d0fdc79..778d8650 100644 --- a/lib/trace-ir/field-wrapper.c +++ b/src/lib/trace-ir/field-wrapper.c @@ -21,14 +21,15 @@ */ #define BT_LOG_TAG "FIELD-WRAPPER" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include +#include "lib/object-pool.h" +#include "lib/object.h" #include +#include "field-wrapper.h" +#include "field.h" + BT_HIDDEN struct bt_field_wrapper *bt_field_wrapper_new(void *data) { diff --git a/include/babeltrace2/trace-ir/field-wrapper-internal.h b/src/lib/trace-ir/field-wrapper.h similarity index 92% rename from include/babeltrace2/trace-ir/field-wrapper-internal.h rename to src/lib/trace-ir/field-wrapper.h index ed16c3fd..97728e0d 100644 --- a/include/babeltrace2/trace-ir/field-wrapper-internal.h +++ b/src/lib/trace-ir/field-wrapper.h @@ -23,9 +23,10 @@ * SOFTWARE. */ -#include -#include -#include +#include "lib/object-pool.h" +#include "lib/object.h" + +#include "field.h" struct bt_field_wrapper { struct bt_object base; diff --git a/lib/trace-ir/field.c b/src/lib/trace-ir/field.c similarity index 98% rename from lib/trace-ir/field.c rename to src/lib/trace-ir/field.c index 4cf15425..4f75c344 100644 --- a/lib/trace-ir/field.c +++ b/src/lib/trace-ir/field.c @@ -22,20 +22,21 @@ */ #define BT_LOG_TAG "FIELDS" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include #include -#include -#include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "compat/compiler.h" +#include "compat/fcntl.h" +#include "common/align.h" +#include "common/assert.h" #include +#include "field.h" +#include "field-class.h" + static void reset_single_field(struct bt_field *field); diff --git a/include/babeltrace2/trace-ir/field-internal.h b/src/lib/trace-ir/field.h similarity index 95% rename from include/babeltrace2/trace-ir/field-internal.h rename to src/lib/trace-ir/field.h index 3da46b5f..3cd4bfe5 100644 --- a/include/babeltrace2/trace-ir/field-internal.h +++ b/src/lib/trace-ir/field.h @@ -24,12 +24,10 @@ * SOFTWARE. */ -#include -#include -#include -#include -#include -#include +#include "lib/assert-pre.h" +#include "common/common.h" +#include "lib/object.h" +#include "common/babeltrace.h" #include #include #include @@ -37,6 +35,9 @@ #include #include +#include "field-class.h" +#include "utils.h" + #define BT_ASSERT_PRE_FIELD_HAS_CLASS_TYPE(_field, _cls_type, _name) \ BT_ASSERT_PRE(((const struct bt_field *) (_field))->class->type == (_cls_type), \ _name " has the wrong class type: expected-class-type=%s, " \ diff --git a/lib/trace-ir/packet-context-field.c b/src/lib/trace-ir/packet-context-field.c similarity index 92% rename from lib/trace-ir/packet-context-field.c rename to src/lib/trace-ir/packet-context-field.c index dbebab8e..03219a2a 100644 --- a/lib/trace-ir/packet-context-field.c +++ b/src/lib/trace-ir/packet-context-field.c @@ -21,15 +21,16 @@ */ #define BT_LOG_TAG "PACKET-CONTEXT-FIELD" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include -#include -#include -#include #include +#include "stream-class.h" +#include "field.h" +#include "field-wrapper.h" + struct bt_field *bt_packet_context_field_borrow_field( struct bt_packet_context_field *context_field) { diff --git a/lib/trace-ir/packet.c b/src/lib/trace-ir/packet.c similarity index 94% rename from lib/trace-ir/packet.c rename to src/lib/trace-ir/packet.c index e005ceaa..585ed48b 100644 --- a/lib/trace-ir/packet.c +++ b/src/lib/trace-ir/packet.c @@ -21,24 +21,25 @@ */ #define BT_LOG_TAG "PACKET" -#include +#include "lib/lib-logging.h" -#include -#include +#include "lib/assert-pre.h" #include #include -#include -#include #include -#include #include #include -#include -#include -#include -#include +#include "lib/object.h" +#include "common/assert.h" #include +#include "field.h" +#include "field-wrapper.h" +#include "packet.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" + #define BT_ASSERT_PRE_PACKET_HOT(_packet) \ BT_ASSERT_PRE_HOT((_packet), "Packet", ": %!+a", (_packet)) diff --git a/include/babeltrace2/trace-ir/packet-internal.h b/src/lib/trace-ir/packet.h similarity index 90% rename from include/babeltrace2/trace-ir/packet-internal.h rename to src/lib/trace-ir/packet.h index 677c9fb0..7b19760c 100644 --- a/include/babeltrace2/trace-ir/packet-internal.h +++ b/src/lib/trace-ir/packet.h @@ -24,15 +24,16 @@ */ #include -#include +#include "common/assert.h" #include #include #include #include -#include -#include -#include -#include +#include "lib/object.h" +#include "common/babeltrace.h" +#include "lib/property.h" + +#include "field-wrapper.h" struct bt_packet { struct bt_object base; diff --git a/lib/trace-ir/resolve-field-path.c b/src/lib/trace-ir/resolve-field-path.c similarity index 97% rename from lib/trace-ir/resolve-field-path.c rename to src/lib/trace-ir/resolve-field-path.c index 1f7b5cd2..a7fe29b9 100644 --- a/lib/trace-ir/resolve-field-path.c +++ b/src/lib/trace-ir/resolve-field-path.c @@ -21,19 +21,20 @@ */ #define BT_LOG_TAG "RESOLVE-FIELD-PATH" -#include +#include "lib/lib-logging.h" -#include -#include -#include -#include +#include "lib/assert-pre.h" +#include "common/assert.h" #include -#include #include #include #include #include +#include "field-class.h" +#include "field-path.h" +#include "resolve-field-path.h" + static bool find_field_class_recursive(struct bt_field_class *fc, struct bt_field_class *tgt_fc, struct bt_field_path *field_path) diff --git a/include/babeltrace2/trace-ir/resolve-field-path-internal.h b/src/lib/trace-ir/resolve-field-path.h similarity index 97% rename from include/babeltrace2/trace-ir/resolve-field-path-internal.h rename to src/lib/trace-ir/resolve-field-path.h index 2b6052fa..48f14acf 100644 --- a/include/babeltrace2/trace-ir/resolve-field-path-internal.h +++ b/src/lib/trace-ir/resolve-field-path.h @@ -26,7 +26,7 @@ * http://www.efficios.com/ctf */ -#include +#include "lib/object.h" #include #include #include diff --git a/lib/trace-ir/stream-class.c b/src/lib/trace-ir/stream-class.c similarity index 95% rename from lib/trace-ir/stream-class.c rename to src/lib/trace-ir/stream-class.c index 1f6732d8..67b24aad 100644 --- a/lib/trace-ir/stream-class.c +++ b/src/lib/trace-ir/stream-class.c @@ -22,28 +22,29 @@ */ #define BT_LOG_TAG "STREAM-CLASS" -#include - -#include -#include -#include -#include -#include -#include +#include "lib/lib-logging.h" + +#include "lib/assert-pre.h" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "compat/compiler.h" +#include "common/align.h" +#include "compat/endian.h" +#include "common/assert.h" +#include "lib/property.h" #include #include #include +#include "clock-class.h" +#include "event-class.h" +#include "field-class.h" +#include "field.h" +#include "field-wrapper.h" +#include "resolve-field-path.h" +#include "stream-class.h" +#include "trace.h" +#include "utils.h" + #define BT_ASSERT_PRE_STREAM_CLASS_HOT(_sc) \ BT_ASSERT_PRE_HOT((_sc), "Stream class", ": %!+S", (_sc)) diff --git a/include/babeltrace2/trace-ir/stream-class-internal.h b/src/lib/trace-ir/stream-class.h similarity index 89% rename from include/babeltrace2/trace-ir/stream-class-internal.h rename to src/lib/trace-ir/stream-class.h index f573c014..1efa7707 100644 --- a/include/babeltrace2/trace-ir/stream-class-internal.h +++ b/src/lib/trace-ir/stream-class.h @@ -24,17 +24,18 @@ * SOFTWARE. */ -#include -#include -#include -#include +#include "common/assert.h" +#include "common/common.h" #include -#include -#include -#include +#include "lib/object.h" +#include "lib/object-pool.h" +#include "common/babeltrace.h" #include #include +#include "field-class.h" +#include "utils.h" + struct bt_stream_class { struct bt_object base; diff --git a/lib/trace-ir/stream.c b/src/lib/trace-ir/stream.c similarity index 93% rename from lib/trace-ir/stream.c rename to src/lib/trace-ir/stream.c index 3af38f32..4e017e4a 100644 --- a/lib/trace-ir/stream.c +++ b/src/lib/trace-ir/stream.c @@ -22,24 +22,25 @@ */ #define BT_LOG_TAG "STREAM" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include +#include "compat/compiler.h" +#include "common/align.h" +#include "common/assert.h" +#include "lib/property.h" #include #include +#include "packet.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" + #define BT_ASSERT_PRE_STREAM_HOT(_stream) \ BT_ASSERT_PRE_HOT((_stream), "Stream", ": %!+s", (_stream)) diff --git a/include/babeltrace2/trace-ir/stream-internal.h b/src/lib/trace-ir/stream.h similarity index 92% rename from include/babeltrace2/trace-ir/stream-internal.h rename to src/lib/trace-ir/stream.h index 820a5a24..96985a93 100644 --- a/include/babeltrace2/trace-ir/stream-internal.h +++ b/src/lib/trace-ir/stream.h @@ -25,12 +25,13 @@ */ #include -#include -#include -#include -#include +#include "lib/object.h" +#include "lib/object-pool.h" +#include "common/babeltrace.h" #include +#include "utils.h" + struct bt_stream_class; struct bt_stream; diff --git a/lib/trace-ir/trace-class.c b/src/lib/trace-ir/trace-class.c similarity index 93% rename from lib/trace-ir/trace-class.c rename to src/lib/trace-ir/trace-class.c index 51cc6691..f05c7711 100644 --- a/lib/trace-ir/trace-class.c +++ b/src/lib/trace-ir/trace-class.c @@ -22,38 +22,39 @@ */ #define BT_LOG_TAG "TRACE" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "ctf-writer/functor.h" +#include "ctf-writer/clock.h" +#include "compat/compiler.h" #include #include -#include +#include "lib/value.h" #include -#include -#include -#include +#include "compat/endian.h" +#include "common/assert.h" +#include "compat/glib.h" #include #include #include #include +#include "attributes.h" +#include "clock-class.h" +#include "event-class.h" +#include "event.h" +#include "field-class.h" +#include "field-wrapper.h" +#include "resolve-field-path.h" +#include "stream-class.h" +#include "stream.h" +#include "trace.h" +#include "utils.h" + struct bt_trace_class_destruction_listener_elem { bt_trace_class_destruction_listener_func func; void *data; diff --git a/include/babeltrace2/trace-ir/trace-class-internal.h b/src/lib/trace-ir/trace-class.h similarity index 85% rename from include/babeltrace2/trace-ir/trace-class-internal.h rename to src/lib/trace-ir/trace-class.h index 50bb1a8d..7c8add5c 100644 --- a/include/babeltrace2/trace-ir/trace-class-internal.h +++ b/src/lib/trace-ir/trace-class.h @@ -24,21 +24,22 @@ * SOFTWARE. */ -#include +#include "lib/assert-pre.h" #include -#include #include #include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "lib/object-pool.h" +#include "common/babeltrace.h" #include #include #include #include -#include +#include "compat/uuid.h" + +#include "stream-class.h" +#include "attributes.h" +#include "clock-class.h" struct bt_trace_class { struct bt_object base; diff --git a/lib/trace-ir/trace.c b/src/lib/trace-ir/trace.c similarity index 90% rename from lib/trace-ir/trace.c rename to src/lib/trace-ir/trace.c index da8d7d75..6dadb10d 100644 --- a/lib/trace-ir/trace.c +++ b/src/lib/trace-ir/trace.c @@ -22,39 +22,40 @@ */ #define BT_LOG_TAG "TRACE" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "ctf-writer/functor.h" +#include "ctf-writer/clock.h" +#include "compat/compiler.h" #include #include -#include +#include "lib/value.h" #include -#include -#include -#include +#include "compat/endian.h" +#include "common/assert.h" +#include "compat/glib.h" #include #include #include #include +#include "attributes.h" +#include "clock-class.h" +#include "event-class.h" +#include "event.h" +#include "field-class.h" +#include "field-wrapper.h" +#include "resolve-field-path.h" +#include "stream-class.h" +#include "stream.h" +#include "trace-class.h" +#include "trace.h" +#include "utils.h" + struct bt_trace_destruction_listener_elem { bt_trace_destruction_listener_func func; void *data; diff --git a/include/babeltrace2/trace-ir/trace-internal.h b/src/lib/trace-ir/trace.h similarity index 84% rename from include/babeltrace2/trace-ir/trace-internal.h rename to src/lib/trace-ir/trace.h index 2476aa45..3a12fd78 100644 --- a/include/babeltrace2/trace-ir/trace-internal.h +++ b/src/lib/trace-ir/trace.h @@ -24,22 +24,23 @@ * SOFTWARE. */ -#include -#include +#include "lib/assert-pre.h" #include -#include #include #include -#include -#include -#include -#include -#include +#include "lib/object.h" +#include "lib/object-pool.h" +#include "common/babeltrace.h" #include #include #include #include -#include +#include "compat/uuid.h" + +#include "attributes.h" +#include "clock-class.h" +#include "stream-class.h" +#include "trace-class.h" struct bt_trace { struct bt_object base; diff --git a/lib/trace-ir/utils.c b/src/lib/trace-ir/utils.c similarity index 90% rename from lib/trace-ir/utils.c rename to src/lib/trace-ir/utils.c index 355cb77d..3b446e01 100644 --- a/lib/trace-ir/utils.c +++ b/src/lib/trace-ir/utils.c @@ -22,10 +22,11 @@ */ #define BT_LOG_TAG "TRACE-IR-UTILS" -#include +#include "lib/lib-logging.h" #include #include -#include #include -#include +#include "common/assert.h" + +#include "field-class.h" diff --git a/include/babeltrace2/trace-ir/utils-internal.h b/src/lib/trace-ir/utils.h similarity index 97% rename from include/babeltrace2/trace-ir/utils-internal.h rename to src/lib/trace-ir/utils.h index 18014d6a..d68bd54b 100644 --- a/include/babeltrace2/trace-ir/utils-internal.h +++ b/src/lib/trace-ir/utils.h @@ -23,11 +23,12 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include #include +#include "clock-class.h" + struct search_query { gpointer value; int found; diff --git a/lib/util.c b/src/lib/util.c similarity index 94% rename from lib/util.c rename to src/lib/util.c index 82456dc8..b17fe2f3 100644 --- a/lib/util.c +++ b/src/lib/util.c @@ -21,15 +21,15 @@ */ #define BT_LOG_TAG "UTIL" -#include +#include "lib/lib-logging.h" -#include +#include "lib/assert-pre.h" #include #include #include #include #include -#include +#include "lib/trace-ir/utils.h" bt_util_status bt_util_clock_cycles_to_ns_from_origin(uint64_t cycles, uint64_t frequency, int64_t offset_seconds, diff --git a/lib/value.c b/src/lib/value.c similarity index 99% rename from lib/value.c rename to src/lib/value.c index 6ec7497d..ca1687fa 100644 --- a/lib/value.c +++ b/src/lib/value.c @@ -21,21 +21,21 @@ */ #define BT_LOG_TAG "VALUES" -#include +#include "lib/lib-logging.h" #include #include #include #include -#include -#include +#include "compat/compiler.h" +#include "common/common.h" #include #include -#include +#include "compat/glib.h" #include -#include -#include -#include +#include "lib/assert-pre.h" +#include "lib/value.h" +#include "common/assert.h" #define BT_VALUE_TO_BOOL(_base) ((struct bt_value_bool *) (_base)) #define BT_VALUE_TO_INTEGER(_base) ((struct bt_value_integer *) (_base)) diff --git a/include/babeltrace2/value-internal.h b/src/lib/value.h similarity index 98% rename from include/babeltrace2/value-internal.h rename to src/lib/value.h index abd607ab..aa741881 100644 --- a/include/babeltrace2/value-internal.h +++ b/src/lib/value.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include +#include "lib/object.h" #include #include #include diff --git a/logging/LICENSE b/src/logging/LICENSE similarity index 100% rename from logging/LICENSE rename to src/logging/LICENSE diff --git a/logging/Makefile.am b/src/logging/Makefile.am similarity index 50% rename from logging/Makefile.am rename to src/logging/Makefile.am index 559ea22f..fd6c6b64 100644 --- a/logging/Makefile.am +++ b/src/logging/Makefile.am @@ -1,3 +1,3 @@ noinst_LTLIBRARIES = libbabeltrace2-logging.la -libbabeltrace2_logging_la_SOURCES = log.c +libbabeltrace2_logging_la_SOURCES = log.c log.h diff --git a/logging/log.c b/src/logging/log.c similarity index 99% rename from logging/log.c rename to src/logging/log.c index a7946ca6..d8c80402 100644 --- a/logging/log.c +++ b/src/logging/log.c @@ -4,10 +4,10 @@ * See LICENSE. */ -#include -#include +#include "common/babeltrace.h" +#include "common/common.h" #include -#include +#include "common/assert.h" #ifdef __CYGWIN__ extern unsigned long pthread_getsequence_np(pthread_t *); @@ -289,7 +289,7 @@ extern unsigned long pthread_getsequence_np(pthread_t *); #undef __STRICT_ANSI__ #endif #endif -#include +#include "common/assert.h" #include #include #include @@ -300,7 +300,7 @@ extern unsigned long pthread_getsequence_np(pthread_t *); #define BT_LOG_OUTPUT_LEVEL dummy -#include +#include "log.h" #include #if defined(_WIN32) || defined(_WIN64) diff --git a/include/babeltrace2/logging-internal.h b/src/logging/log.h similarity index 98% rename from include/babeltrace2/logging-internal.h rename to src/logging/log.h index 7aff10b2..44f778a0 100644 --- a/include/babeltrace2/logging-internal.h +++ b/src/logging/log.h @@ -12,14 +12,14 @@ #include #include #include -#include +#include "common/babeltrace.h" /* To detect incompatible changes you can define BT_LOG_VERSION_REQUIRED to be * the current value of BT_LOG_VERSION before including this file (or via * compiler command line): * * #define BT_LOG_VERSION_REQUIRED 4 - * #include + * #include "logging.h" * * Compilation will fail when included file has different version. */ @@ -77,7 +77,7 @@ * before including bt_log.h: * * #define BT_LOG_LEVEL BT_LOG_VERBOSE - * #include + * #include "logging.h" * * If both BT_LOG_DEF_LEVEL and BT_LOG_LEVEL are undefined, then BT_LOG_INFO * will be used for release builds (NDEBUG is defined) and BT_LOG_DEBUG @@ -122,7 +122,7 @@ * Example: * * #define BT_LOG_OUTPUT_LEVEL g_module_log_level - * #include + * #include "logging.h" * static int g_module_log_level = BT_LOG_INFO; * static void foo() { * BT_LOGI("Will check g_module_log_level for output log level"); @@ -140,7 +140,7 @@ * must be the first field in this structure: * * #define BT_LOG_OUTPUT_LEVEL (g_config.log_level) - * #include + * #include "logging.h" * struct config { * int log_level; * unsigned other_field; @@ -189,7 +189,7 @@ * before including bt_log.h: * * #define BT_LOG_TAG "MAIN" - * #include + * #include "logging.h" * * If both BT_LOG_DEF_TAG and BT_LOG_TAG are undefined no tag will be added to * the log message (tag prefix still could be added though). @@ -238,7 +238,7 @@ * before including bt_log.h: * * #define BT_LOG_SRCLOC BT_LOG_SRCLOC_NONE - * #include + * #include "logging.h" * * If both BT_LOG_DEF_SRCLOC and BT_LOG_SRCLOC are undefined, then * BT_LOG_SRCLOC_NONE will be used for release builds (NDEBUG is defined) and @@ -286,7 +286,7 @@ * very careful not to push such temporary changes to source control): * * #define BT_LOG_CENSORING BT_LOG_UNCENSORED - * #include + * #include "logging.h" * * If both BT_LOG_DEF_CENSORING and BT_LOG_CENSORING are undefined, then * BT_LOG_CENSORED will be used for release builds (NDEBUG is defined) and @@ -335,7 +335,7 @@ * * For example, in log_config.c: * - * #include + * #include "logging.h" * BT_LOG_DEFINE_TAG_PREFIX = "MyApp"; * BT_LOG_DEFINE_GLOBAL_FORMAT = {CUSTOM_MEM_WIDTH}; * BT_LOG_DEFINE_GLOBAL_OUTPUT = {BT_LOG_PUT_STD, custom_output_callback, 0}; @@ -407,7 +407,7 @@ * * // KittyHttpLogging.h * #define BT_LOG_LIBRARY_PREFIX KittyHttp_ - * #include + * #include "logging.h" * * Regardless of the method chosen, the end result is that bt_log symbols will * be prefixed with "KittyHttp_", so if a user of KittyHttp (say DogeBrowser) diff --git a/plugins/Makefile.am b/src/plugins/Makefile.am similarity index 100% rename from plugins/Makefile.am rename to src/plugins/Makefile.am diff --git a/plugins/ctf/Makefile.am b/src/plugins/ctf/Makefile.am similarity index 73% rename from plugins/ctf/Makefile.am rename to src/plugins/ctf/Makefile.am index 5f5c859d..bf962693 100644 --- a/plugins/ctf/Makefile.am +++ b/src/plugins/ctf/Makefile.am @@ -23,8 +23,8 @@ babeltrace_plugin_ctf_la_LIBADD = \ if !ENABLE_BUILT_IN_PLUGINS babeltrace_plugin_ctf_la_LIBADD += \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/ctfser/libbabeltrace2-ctfser.la + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/ctfser/libbabeltrace2-ctfser.la endif diff --git a/plugins/ctf/common/Makefile.am b/src/plugins/ctf/common/Makefile.am similarity index 100% rename from plugins/ctf/common/Makefile.am rename to src/plugins/ctf/common/Makefile.am diff --git a/plugins/ctf/common/bfcr/Makefile.am b/src/plugins/ctf/common/bfcr/Makefile.am similarity index 100% rename from plugins/ctf/common/bfcr/Makefile.am rename to src/plugins/ctf/common/bfcr/Makefile.am diff --git a/plugins/ctf/common/bfcr/bfcr.c b/src/plugins/ctf/common/bfcr/bfcr.c similarity index 99% rename from plugins/ctf/common/bfcr/bfcr.c rename to src/plugins/ctf/common/bfcr/bfcr.c index 91d6788a..2bdd961d 100644 --- a/plugins/ctf/common/bfcr/bfcr.c +++ b/src/plugins/ctf/common/bfcr/bfcr.c @@ -32,12 +32,12 @@ #include #include #include -#include +#include "common/assert.h" #include -#include -#include +#include "compat/bitfield.h" +#include "common/common.h" #include -#include +#include "common/align.h" #include #include "bfcr.h" diff --git a/plugins/ctf/common/bfcr/bfcr.h b/src/plugins/ctf/common/bfcr/bfcr.h similarity index 99% rename from plugins/ctf/common/bfcr/bfcr.h rename to src/plugins/ctf/common/bfcr/bfcr.h index 66a7ef71..9cc5aadc 100644 --- a/plugins/ctf/common/bfcr/bfcr.h +++ b/src/plugins/ctf/common/bfcr/bfcr.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include "common/babeltrace.h" #include "../metadata/ctf-meta.h" diff --git a/plugins/ctf/common/bfcr/btr.gdb b/src/plugins/ctf/common/bfcr/btr.gdb similarity index 100% rename from plugins/ctf/common/bfcr/btr.gdb rename to src/plugins/ctf/common/bfcr/btr.gdb diff --git a/plugins/ctf/common/bfcr/logging.c b/src/plugins/ctf/common/bfcr/logging.c similarity index 96% rename from plugins/ctf/common/bfcr/logging.c rename to src/plugins/ctf/common/bfcr/logging.c index 2dd5a5b1..77ac65f2 100644 --- a/plugins/ctf/common/bfcr/logging.c +++ b/src/plugins/ctf/common/bfcr/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL bfcr_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bfcr_log_level, "BABELTRACE_PLUGIN_CTF_BFCR_LOG_LEVEL"); diff --git a/plugins/ctf/common/bfcr/logging.h b/src/plugins/ctf/common/bfcr/logging.h similarity index 96% rename from plugins/ctf/common/bfcr/logging.h rename to src/plugins/ctf/common/bfcr/logging.h index cd6fb683..cb284685 100644 --- a/plugins/ctf/common/bfcr/logging.h +++ b/src/plugins/ctf/common/bfcr/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bfcr_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bfcr_log_level); diff --git a/plugins/ctf/common/metadata/Makefile.am b/src/plugins/ctf/common/metadata/Makefile.am similarity index 100% rename from plugins/ctf/common/metadata/Makefile.am rename to src/plugins/ctf/common/metadata/Makefile.am diff --git a/plugins/ctf/common/metadata/ast.h b/src/plugins/ctf/common/metadata/ast.h similarity index 99% rename from plugins/ctf/common/metadata/ast.h rename to src/plugins/ctf/common/metadata/ast.h index b2eec360..6f6fbe7b 100644 --- a/plugins/ctf/common/metadata/ast.h +++ b/src/plugins/ctf/common/metadata/ast.h @@ -20,9 +20,9 @@ #include #include #include -#include +#include "common/list.h" #include -#include +#include "common/babeltrace.h" #include "decoder.h" #include "ctf-meta.h" diff --git a/plugins/ctf/common/metadata/ctf-meta-resolve.c b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c similarity index 99% rename from plugins/ctf/common/metadata/ctf-meta-resolve.c rename to src/plugins/ctf/common/metadata/ctf-meta-resolve.c index 2d54d0fb..130ae61b 100644 --- a/plugins/ctf/common/metadata/ctf-meta-resolve.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c @@ -17,9 +17,9 @@ #include "logging.h" #include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" +#include "common/common.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-translate.c b/src/plugins/ctf/common/metadata/ctf-meta-translate.c similarity index 99% rename from plugins/ctf/common/metadata/ctf-meta-translate.c rename to src/plugins/ctf/common/metadata/ctf-meta-translate.c index ca3069ae..287cc259 100644 --- a/plugins/ctf/common/metadata/ctf-meta-translate.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-translate.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c similarity index 98% rename from plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c index 057e0b4e..f114d80b 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-update-in-ir.c b/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.c similarity index 97% rename from plugins/ctf/common/metadata/ctf-meta-update-in-ir.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.c index 806a9197..e6342942 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-in-ir.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-in-ir.c @@ -16,14 +16,14 @@ #include "logging.h" #include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" +#include "compat/glib.h" #include #include #include #include -#include +#include "common/assert.h" #include "ctf-meta-visitors.h" diff --git a/plugins/ctf/common/metadata/ctf-meta-update-meanings.c b/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.c similarity index 98% rename from plugins/ctf/common/metadata/ctf-meta-update-meanings.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-meanings.c index 1e78c3af..bd801979 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-meanings.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-meanings.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c b/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c similarity index 96% rename from plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c index 9bd0bc6c..d5dd9d93 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-stream-class-config.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c b/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c similarity index 97% rename from plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c index 29d231f0..8201954d 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-text-array-sequence.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c b/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c similarity index 98% rename from plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c rename to src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c index 05abb49c..81f76382 100644 --- a/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-value-storing-indexes.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-validate.c b/src/plugins/ctf/common/metadata/ctf-meta-validate.c similarity index 99% rename from plugins/ctf/common/metadata/ctf-meta-validate.c rename to src/plugins/ctf/common/metadata/ctf-meta-validate.c index 6070070c..bb1aac0c 100644 --- a/plugins/ctf/common/metadata/ctf-meta-validate.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-validate.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta-visitors.h b/src/plugins/ctf/common/metadata/ctf-meta-visitors.h similarity index 97% rename from plugins/ctf/common/metadata/ctf-meta-visitors.h rename to src/plugins/ctf/common/metadata/ctf-meta-visitors.h index 91ad9292..9eb3cf38 100644 --- a/plugins/ctf/common/metadata/ctf-meta-visitors.h +++ b/src/plugins/ctf/common/metadata/ctf-meta-visitors.h @@ -16,7 +16,7 @@ */ #include -#include +#include "common/babeltrace.h" #include "ctf-meta.h" diff --git a/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c similarity index 97% rename from plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c rename to src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c index 78bb4588..73b6fe92 100644 --- a/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c @@ -16,8 +16,8 @@ #include "logging.h" #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/ctf-meta.h b/src/plugins/ctf/common/metadata/ctf-meta.h similarity index 99% rename from plugins/ctf/common/metadata/ctf-meta.h rename to src/plugins/ctf/common/metadata/ctf-meta.h index 3e789631..29c5e178 100644 --- a/plugins/ctf/common/metadata/ctf-meta.h +++ b/src/plugins/ctf/common/metadata/ctf-meta.h @@ -16,8 +16,8 @@ */ #include -#include -#include +#include "common/common.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/common/metadata/decoder.c b/src/plugins/ctf/common/metadata/decoder.c similarity index 99% rename from plugins/ctf/common/metadata/decoder.c rename to src/plugins/ctf/common/metadata/decoder.c index c39e79e3..53749a7f 100644 --- a/plugins/ctf/common/metadata/decoder.c +++ b/src/plugins/ctf/common/metadata/decoder.c @@ -20,9 +20,9 @@ #include #include #include -#include -#include -#include +#include "common/assert.h" +#include "compat/uuid.h" +#include "compat/memstream.h" #include #include #include diff --git a/plugins/ctf/common/metadata/decoder.h b/src/plugins/ctf/common/metadata/decoder.h similarity index 100% rename from plugins/ctf/common/metadata/decoder.h rename to src/plugins/ctf/common/metadata/decoder.h diff --git a/plugins/ctf/common/metadata/lexer.l b/src/plugins/ctf/common/metadata/lexer.l similarity index 100% rename from plugins/ctf/common/metadata/lexer.l rename to src/plugins/ctf/common/metadata/lexer.l diff --git a/plugins/ctf/common/metadata/logging.c b/src/plugins/ctf/common/metadata/logging.c similarity index 96% rename from plugins/ctf/common/metadata/logging.c rename to src/plugins/ctf/common/metadata/logging.c index c5140a3b..c7b514f4 100644 --- a/plugins/ctf/common/metadata/logging.c +++ b/src/plugins/ctf/common/metadata/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL metadata_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(metadata_log_level, "BABELTRACE_PLUGIN_CTF_METADATA_LOG_LEVEL"); diff --git a/plugins/ctf/common/metadata/logging.h b/src/plugins/ctf/common/metadata/logging.h similarity index 97% rename from plugins/ctf/common/metadata/logging.h rename to src/plugins/ctf/common/metadata/logging.h index 236cbc23..81f76a2a 100644 --- a/plugins/ctf/common/metadata/logging.h +++ b/src/plugins/ctf/common/metadata/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL metadata_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(metadata_log_level); diff --git a/plugins/ctf/common/metadata/objstack.c b/src/plugins/ctf/common/metadata/objstack.c similarity index 96% rename from plugins/ctf/common/metadata/objstack.c rename to src/plugins/ctf/common/metadata/objstack.c index 2f703800..15b6d26a 100644 --- a/plugins/ctf/common/metadata/objstack.c +++ b/src/plugins/ctf/common/metadata/objstack.c @@ -28,9 +28,9 @@ #include "logging.h" #include -#include -#include -#include +#include "common/list.h" +#include "common/babeltrace.h" +#include "common/align.h" #define OBJSTACK_ALIGN 8 /* Object stack alignment */ #define OBJSTACK_INIT_LEN 128 diff --git a/plugins/ctf/common/metadata/objstack.h b/src/plugins/ctf/common/metadata/objstack.h similarity index 100% rename from plugins/ctf/common/metadata/objstack.h rename to src/plugins/ctf/common/metadata/objstack.h diff --git a/plugins/ctf/common/metadata/parser.y b/src/plugins/ctf/common/metadata/parser.y similarity index 99% rename from plugins/ctf/common/metadata/parser.y rename to src/plugins/ctf/common/metadata/parser.y index 4e666dbb..8082a0b0 100644 --- a/plugins/ctf/common/metadata/parser.y +++ b/src/plugins/ctf/common/metadata/parser.y @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include "common/list.h" +#include "common/assert.h" #include "scanner.h" #include "parser.h" #include "ast.h" diff --git a/plugins/ctf/common/metadata/scanner-symbols.h b/src/plugins/ctf/common/metadata/scanner-symbols.h similarity index 100% rename from plugins/ctf/common/metadata/scanner-symbols.h rename to src/plugins/ctf/common/metadata/scanner-symbols.h diff --git a/plugins/ctf/common/metadata/scanner.h b/src/plugins/ctf/common/metadata/scanner.h similarity index 100% rename from plugins/ctf/common/metadata/scanner.h rename to src/plugins/ctf/common/metadata/scanner.h diff --git a/plugins/ctf/common/metadata/visitor-generate-ir.c b/src/plugins/ctf/common/metadata/visitor-generate-ir.c similarity index 99% rename from plugins/ctf/common/metadata/visitor-generate-ir.c rename to src/plugins/ctf/common/metadata/visitor-generate-ir.c index 90074233..d2f80d0f 100644 --- a/plugins/ctf/common/metadata/visitor-generate-ir.c +++ b/src/plugins/ctf/common/metadata/visitor-generate-ir.c @@ -36,13 +36,13 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include -#include -#include -#include +#include "common/common.h" +#include "compat/uuid.h" +#include "compat/endian.h" #include #include "scanner.h" diff --git a/plugins/ctf/common/metadata/visitor-parent-links.c b/src/plugins/ctf/common/metadata/visitor-parent-links.c similarity index 99% rename from plugins/ctf/common/metadata/visitor-parent-links.c rename to src/plugins/ctf/common/metadata/visitor-parent-links.c index c163dc12..64098a9a 100644 --- a/plugins/ctf/common/metadata/visitor-parent-links.c +++ b/src/plugins/ctf/common/metadata/visitor-parent-links.c @@ -31,12 +31,12 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include -#include -#include +#include "common/babeltrace.h" +#include "common/list.h" #include "scanner.h" #include "parser.h" #include "ast.h" diff --git a/plugins/ctf/common/metadata/visitor-semantic-validator.c b/src/plugins/ctf/common/metadata/visitor-semantic-validator.c similarity index 99% rename from plugins/ctf/common/metadata/visitor-semantic-validator.c rename to src/plugins/ctf/common/metadata/visitor-semantic-validator.c index 0149d615..5592d6d5 100644 --- a/plugins/ctf/common/metadata/visitor-semantic-validator.c +++ b/src/plugins/ctf/common/metadata/visitor-semantic-validator.c @@ -31,11 +31,11 @@ #include #include #include -#include +#include "common/assert.h" #include #include #include -#include +#include "common/list.h" #include "scanner.h" #include "parser.h" #include "ast.h" diff --git a/plugins/ctf/common/msg-iter/Makefile.am b/src/plugins/ctf/common/msg-iter/Makefile.am similarity index 100% rename from plugins/ctf/common/msg-iter/Makefile.am rename to src/plugins/ctf/common/msg-iter/Makefile.am diff --git a/plugins/ctf/common/msg-iter/logging.c b/src/plugins/ctf/common/msg-iter/logging.c similarity index 96% rename from plugins/ctf/common/msg-iter/logging.c rename to src/plugins/ctf/common/msg-iter/logging.c index 3b9b2850..662c4433 100644 --- a/plugins/ctf/common/msg-iter/logging.c +++ b/src/plugins/ctf/common/msg-iter/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL ctf_msg_iter_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(ctf_msg_iter_log_level, "BABELTRACE_PLUGIN_CTF_MSG_ITER_LOG_LEVEL"); diff --git a/plugins/ctf/common/msg-iter/logging.h b/src/plugins/ctf/common/msg-iter/logging.h similarity index 96% rename from plugins/ctf/common/msg-iter/logging.h rename to src/plugins/ctf/common/msg-iter/logging.h index 7e41dd98..9788916a 100644 --- a/plugins/ctf/common/msg-iter/logging.h +++ b/src/plugins/ctf/common/msg-iter/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL ctf_msg_iter_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(ctf_msg_iter_log_level); diff --git a/plugins/ctf/common/msg-iter/msg-iter.c b/src/plugins/ctf/common/msg-iter/msg-iter.c similarity index 99% rename from plugins/ctf/common/msg-iter/msg-iter.c rename to src/plugins/ctf/common/msg-iter/msg-iter.c index 0671d9c3..2a1c4713 100644 --- a/plugins/ctf/common/msg-iter/msg-iter.c +++ b/src/plugins/ctf/common/msg-iter/msg-iter.c @@ -31,10 +31,10 @@ #include #include #include -#include +#include "common/assert.h" #include #include -#include +#include "common/common.h" #include #include diff --git a/plugins/ctf/common/msg-iter/msg-iter.h b/src/plugins/ctf/common/msg-iter/msg-iter.h similarity index 99% rename from plugins/ctf/common/msg-iter/msg-iter.h rename to src/plugins/ctf/common/msg-iter/msg-iter.h index c893fda1..65dd0ee1 100644 --- a/plugins/ctf/common/msg-iter/msg-iter.h +++ b/src/plugins/ctf/common/msg-iter/msg-iter.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include "common/babeltrace.h" #include "../metadata/ctf-meta.h" diff --git a/plugins/ctf/common/print.h b/src/plugins/ctf/common/print.h similarity index 97% rename from plugins/ctf/common/print.h rename to src/plugins/ctf/common/print.h index a19dbffa..8825a9a7 100644 --- a/plugins/ctf/common/print.h +++ b/src/plugins/ctf/common/print.h @@ -26,7 +26,7 @@ */ #include -#include +#include "common/babeltrace.h" #define PERR(fmt, ...) \ do { \ diff --git a/plugins/ctf/common/utils/Makefile.am b/src/plugins/ctf/common/utils/Makefile.am similarity index 100% rename from plugins/ctf/common/utils/Makefile.am rename to src/plugins/ctf/common/utils/Makefile.am diff --git a/plugins/ctf/common/utils/logging.c b/src/plugins/ctf/common/utils/logging.c similarity index 96% rename from plugins/ctf/common/utils/logging.c rename to src/plugins/ctf/common/utils/logging.c index 9a5e1e50..bd773eaf 100644 --- a/plugins/ctf/common/utils/logging.c +++ b/src/plugins/ctf/common/utils/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL utils_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(utils_log_level, "BABELTRACE_PLUGIN_CTF_UTILS_LOG_LEVEL"); diff --git a/plugins/ctf/common/utils/logging.h b/src/plugins/ctf/common/utils/logging.h similarity index 96% rename from plugins/ctf/common/utils/logging.h rename to src/plugins/ctf/common/utils/logging.h index a5f51675..2eeace49 100644 --- a/plugins/ctf/common/utils/logging.h +++ b/src/plugins/ctf/common/utils/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL utils_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(utils_log_level); diff --git a/plugins/ctf/common/utils/utils.c b/src/plugins/ctf/common/utils/utils.c similarity index 100% rename from plugins/ctf/common/utils/utils.c rename to src/plugins/ctf/common/utils/utils.c diff --git a/plugins/ctf/common/utils/utils.h b/src/plugins/ctf/common/utils/utils.h similarity index 96% rename from plugins/ctf/common/utils/utils.h rename to src/plugins/ctf/common/utils/utils.h index 266ae7cf..28f056ca 100644 --- a/plugins/ctf/common/utils/utils.h +++ b/src/plugins/ctf/common/utils/utils.h @@ -26,6 +26,6 @@ */ #include -#include +#include "common/babeltrace.h" #endif /* CTF_UTILS_H */ diff --git a/plugins/ctf/fs-sink/Makefile.am b/src/plugins/ctf/fs-sink/Makefile.am similarity index 100% rename from plugins/ctf/fs-sink/Makefile.am rename to src/plugins/ctf/fs-sink/Makefile.am diff --git a/plugins/ctf/fs-sink/fs-sink-ctf-meta.h b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h similarity index 99% rename from plugins/ctf/fs-sink/fs-sink-ctf-meta.h rename to src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h index 2070c39a..6ae88dfb 100644 --- a/plugins/ctf/fs-sink/fs-sink-ctf-meta.h +++ b/src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h @@ -16,9 +16,9 @@ */ #include -#include -#include -#include +#include "common/common.h" +#include "common/assert.h" +#include "compat/uuid.h" #include #include #include diff --git a/plugins/ctf/fs-sink/fs-sink-stream.c b/src/plugins/ctf/fs-sink/fs-sink-stream.c similarity index 99% rename from plugins/ctf/fs-sink/fs-sink-stream.c rename to src/plugins/ctf/fs-sink/fs-sink-stream.c index edf8dd03..026251a6 100644 --- a/plugins/ctf/fs-sink/fs-sink-stream.c +++ b/src/plugins/ctf/fs-sink/fs-sink-stream.c @@ -27,9 +27,9 @@ #include #include #include -#include -#include -#include +#include "common/assert.h" +#include "ctfser/ctfser.h" +#include "compat/endian.h" #include "fs-sink-trace.h" #include "fs-sink-stream.h" diff --git a/plugins/ctf/fs-sink/fs-sink-stream.h b/src/plugins/ctf/fs-sink/fs-sink-stream.h similarity index 98% rename from plugins/ctf/fs-sink/fs-sink-stream.h rename to src/plugins/ctf/fs-sink/fs-sink-stream.h index 959d01a5..c3efc9a0 100644 --- a/plugins/ctf/fs-sink/fs-sink-stream.h +++ b/src/plugins/ctf/fs-sink/fs-sink-stream.h @@ -23,9 +23,9 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include +#include "ctfser/ctfser.h" #include #include #include diff --git a/plugins/ctf/fs-sink/fs-sink-trace.c b/src/plugins/ctf/fs-sink/fs-sink-trace.c similarity index 99% rename from plugins/ctf/fs-sink/fs-sink-trace.c rename to src/plugins/ctf/fs-sink/fs-sink-trace.c index 400b21d7..7f5c83a7 100644 --- a/plugins/ctf/fs-sink/fs-sink-trace.c +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.c @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include "common/assert.h" +#include "ctfser/ctfser.h" #include "translate-trace-ir-to-ctf-ir.h" #include "translate-ctf-ir-to-tsdl.h" diff --git a/plugins/ctf/fs-sink/fs-sink-trace.h b/src/plugins/ctf/fs-sink/fs-sink-trace.h similarity index 96% rename from plugins/ctf/fs-sink/fs-sink-trace.h rename to src/plugins/ctf/fs-sink/fs-sink-trace.h index e135ffa6..9a8ac525 100644 --- a/plugins/ctf/fs-sink/fs-sink-trace.h +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.h @@ -23,9 +23,9 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include -#include +#include "ctfser/ctfser.h" #include #include #include diff --git a/plugins/ctf/fs-sink/fs-sink.c b/src/plugins/ctf/fs-sink/fs-sink.c similarity index 99% rename from plugins/ctf/fs-sink/fs-sink.c rename to src/plugins/ctf/fs-sink/fs-sink.c index 021066f0..42d822e1 100644 --- a/plugins/ctf/fs-sink/fs-sink.c +++ b/src/plugins/ctf/fs-sink/fs-sink.c @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include "common/assert.h" +#include "ctfser/ctfser.h" #include "fs-sink.h" #include "fs-sink-trace.h" diff --git a/plugins/ctf/fs-sink/fs-sink.h b/src/plugins/ctf/fs-sink/fs-sink.h similarity index 98% rename from plugins/ctf/fs-sink/fs-sink.h rename to src/plugins/ctf/fs-sink/fs-sink.h index 278bdbec..7a740bc2 100644 --- a/plugins/ctf/fs-sink/fs-sink.h +++ b/src/plugins/ctf/fs-sink/fs-sink.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include #include #include diff --git a/plugins/ctf/fs-sink/logging.c b/src/plugins/ctf/fs-sink/logging.c similarity index 96% rename from plugins/ctf/fs-sink/logging.c rename to src/plugins/ctf/fs-sink/logging.c index e53d744b..0469b7a7 100644 --- a/plugins/ctf/fs-sink/logging.c +++ b/src/plugins/ctf/fs-sink/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_fs_sink_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_fs_sink_log_level, "BABELTRACE_SINK_CTF_FS_LOG_LEVEL"); diff --git a/plugins/ctf/fs-sink/logging.h b/src/plugins/ctf/fs-sink/logging.h similarity index 97% rename from plugins/ctf/fs-sink/logging.h rename to src/plugins/ctf/fs-sink/logging.h index 3ae63201..a6c9dd4d 100644 --- a/plugins/ctf/fs-sink/logging.h +++ b/src/plugins/ctf/fs-sink/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_fs_sink_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_fs_sink_log_level); diff --git a/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c similarity index 99% rename from plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c rename to src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c index 57159953..3b6d2bc9 100644 --- a/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c +++ b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c @@ -24,13 +24,13 @@ #include "logging.h" #include -#include +#include "common/babeltrace.h" #include #include #include #include -#include -#include +#include "common/assert.h" +#include "compat/endian.h" #include "fs-sink-ctf-meta.h" diff --git a/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.h b/src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.h similarity index 100% rename from plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.h rename to src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.h diff --git a/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c similarity index 99% rename from plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c rename to src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c index d398f659..64f4d5ea 100644 --- a/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c +++ b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c @@ -24,9 +24,9 @@ #include "logging.h" #include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/common.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h similarity index 97% rename from plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h rename to src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h index 23cd5d98..3a1a31e1 100644 --- a/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h +++ b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include #include "fs-sink-ctf-meta.h" diff --git a/plugins/ctf/fs-src/Makefile.am b/src/plugins/ctf/fs-src/Makefile.am similarity index 87% rename from plugins/ctf/fs-src/Makefile.am rename to src/plugins/ctf/fs-src/Makefile.am index 012f4eb9..37ad7ed6 100644 --- a/plugins/ctf/fs-src/Makefile.am +++ b/src/plugins/ctf/fs-src/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-ctf-fs-src.la libbabeltrace2_plugin_ctf_fs_src_la_SOURCES = \ diff --git a/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c similarity index 99% rename from plugins/ctf/fs-src/data-stream-file.c rename to src/plugins/ctf/fs-src/data-stream-file.c index 99d3b472..5b0086af 100644 --- a/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -29,14 +29,14 @@ #include #include #include -#include -#include +#include "compat/mman.h" +#include "compat/endian.h" #include -#include +#include "common/common.h" #include "file.h" #include "metadata.h" #include "../common/msg-iter/msg-iter.h" -#include +#include "common/assert.h" #include "data-stream-file.h" #include diff --git a/plugins/ctf/fs-src/data-stream-file.h b/src/plugins/ctf/fs-src/data-stream-file.h similarity index 98% rename from plugins/ctf/fs-src/data-stream-file.h rename to src/plugins/ctf/fs-src/data-stream-file.h index feeef675..c826a656 100644 --- a/plugins/ctf/fs-src/data-stream-file.h +++ b/src/plugins/ctf/fs-src/data-stream-file.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include "common/babeltrace.h" #include #include "../common/msg-iter/msg-iter.h" diff --git a/plugins/ctf/fs-src/file.c b/src/plugins/ctf/fs-src/file.c similarity index 100% rename from plugins/ctf/fs-src/file.c rename to src/plugins/ctf/fs-src/file.c diff --git a/plugins/ctf/fs-src/file.h b/src/plugins/ctf/fs-src/file.h similarity index 97% rename from plugins/ctf/fs-src/file.h rename to src/plugins/ctf/fs-src/file.h index 4e578af3..509b1e4e 100644 --- a/plugins/ctf/fs-src/file.h +++ b/src/plugins/ctf/fs-src/file.h @@ -25,7 +25,7 @@ #include #include -#include +#include "common/babeltrace.h" #include "fs.h" BT_HIDDEN diff --git a/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c similarity index 99% rename from plugins/ctf/fs-src/fs.c rename to src/plugins/ctf/fs-src/fs.c index 3cee435a..5ff6d352 100644 --- a/plugins/ctf/fs-src/fs.c +++ b/src/plugins/ctf/fs-src/fs.c @@ -25,12 +25,12 @@ * SOFTWARE. */ -#include +#include "common/common.h" #include -#include -#include +#include "compat/uuid.h" +#include "plugins/plugins-common.h" #include -#include +#include "common/assert.h" #include #include #include "fs.h" diff --git a/plugins/ctf/fs-src/fs.h b/src/plugins/ctf/fs-src/fs.h similarity index 99% rename from plugins/ctf/fs-src/fs.h rename to src/plugins/ctf/fs-src/fs.h index 9e9ee84d..33e1f568 100644 --- a/plugins/ctf/fs-src/fs.h +++ b/src/plugins/ctf/fs-src/fs.h @@ -29,7 +29,7 @@ */ #include -#include +#include "common/babeltrace.h" #include #include "data-stream-file.h" #include "metadata.h" diff --git a/plugins/ctf/fs-src/logging.c b/src/plugins/ctf/fs-src/logging.c similarity index 96% rename from plugins/ctf/fs-src/logging.c rename to src/plugins/ctf/fs-src/logging.c index 6f24ce76..e9e58629 100644 --- a/plugins/ctf/fs-src/logging.c +++ b/src/plugins/ctf/fs-src/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL ctf_fs_src_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(BT_LOG_OUTPUT_LEVEL, "BABELTRACE_SRC_CTF_FS_LOG_LEVEL"); diff --git a/plugins/ctf/fs-src/logging.h b/src/plugins/ctf/fs-src/logging.h similarity index 96% rename from plugins/ctf/fs-src/logging.h rename to src/plugins/ctf/fs-src/logging.h index 8a249dcc..2f52057b 100644 --- a/plugins/ctf/fs-src/logging.h +++ b/src/plugins/ctf/fs-src/logging.h @@ -24,7 +24,7 @@ #define CTF_FS_SRC_LOGGING_H #define BT_LOG_OUTPUT_LEVEL ctf_fs_src_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(ctf_fs_src_log_level); diff --git a/plugins/ctf/fs-src/lttng-index.h b/src/plugins/ctf/fs-src/lttng-index.h similarity index 98% rename from plugins/ctf/fs-src/lttng-index.h rename to src/plugins/ctf/fs-src/lttng-index.h index 037010d7..23747719 100644 --- a/plugins/ctf/fs-src/lttng-index.h +++ b/src/plugins/ctf/fs-src/lttng-index.h @@ -25,7 +25,7 @@ #ifndef LTTNG_INDEX_H #define LTTNG_INDEX_H -#include +#include "compat/limits.h" #define CTF_INDEX_MAGIC 0xC1F1DCC1 #define CTF_INDEX_MAJOR 1 diff --git a/plugins/ctf/fs-src/metadata.c b/src/plugins/ctf/fs-src/metadata.c similarity index 96% rename from plugins/ctf/fs-src/metadata.c rename to src/plugins/ctf/fs-src/metadata.c index 75043dc1..30744612 100644 --- a/plugins/ctf/fs-src/metadata.c +++ b/src/plugins/ctf/fs-src/metadata.c @@ -27,10 +27,10 @@ #include #include #include -#include +#include "common/assert.h" #include -#include -#include +#include "compat/uuid.h" +#include "compat/memstream.h" #include #include "fs.h" diff --git a/plugins/ctf/fs-src/metadata.h b/src/plugins/ctf/fs-src/metadata.h similarity index 97% rename from plugins/ctf/fs-src/metadata.h rename to src/plugins/ctf/fs-src/metadata.h index 6ddc0291..414b875b 100644 --- a/plugins/ctf/fs-src/metadata.h +++ b/src/plugins/ctf/fs-src/metadata.h @@ -25,7 +25,7 @@ #include #include -#include +#include "common/babeltrace.h" #include #define CTF_FS_METADATA_FILENAME "metadata" diff --git a/plugins/ctf/fs-src/query.c b/src/plugins/ctf/fs-src/query.c similarity index 99% rename from plugins/ctf/fs-src/query.c rename to src/plugins/ctf/fs-src/query.c index e2018b15..3fa28b86 100644 --- a/plugins/ctf/fs-src/query.c +++ b/src/plugins/ctf/fs-src/query.c @@ -26,11 +26,11 @@ #include "query.h" #include -#include +#include "common/assert.h" #include "metadata.h" #include "../common/metadata/decoder.h" -#include -#include +#include "common/common.h" +#include "common/babeltrace.h" #include #include "fs.h" diff --git a/plugins/ctf/fs-src/query.h b/src/plugins/ctf/fs-src/query.h similarity index 97% rename from plugins/ctf/fs-src/query.h rename to src/plugins/ctf/fs-src/query.h index d19a1394..4125e4a9 100644 --- a/plugins/ctf/fs-src/query.h +++ b/src/plugins/ctf/fs-src/query.h @@ -25,7 +25,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include BT_HIDDEN diff --git a/plugins/ctf/lttng-live/Makefile.am b/src/plugins/ctf/lttng-live/Makefile.am similarity index 91% rename from plugins/ctf/lttng-live/Makefile.am rename to src/plugins/ctf/lttng-live/Makefile.am index aecd8391..853f47d6 100644 --- a/plugins/ctf/lttng-live/Makefile.am +++ b/src/plugins/ctf/lttng-live/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - libbabeltrace2_plugin_ctf_lttng_live_la_SOURCES = \ lttng-live.c \ lttng-live.h \ diff --git a/plugins/ctf/lttng-live/data-stream.c b/src/plugins/ctf/lttng-live/data-stream.c similarity index 98% rename from plugins/ctf/lttng-live/data-stream.c rename to src/plugins/ctf/lttng-live/data-stream.c index d617c302..25a8e4cf 100644 --- a/plugins/ctf/lttng-live/data-stream.c +++ b/src/plugins/ctf/lttng-live/data-stream.c @@ -32,10 +32,10 @@ #include #include #include -#include +#include "compat/mman.h" #include #include "../common/msg-iter/msg-iter.h" -#include +#include "common/assert.h" #include "data-stream.h" diff --git a/plugins/ctf/lttng-live/data-stream.h b/src/plugins/ctf/lttng-live/data-stream.h similarity index 97% rename from plugins/ctf/lttng-live/data-stream.h rename to src/plugins/ctf/lttng-live/data-stream.h index 8ae5e59e..d9e273a8 100644 --- a/plugins/ctf/lttng-live/data-stream.h +++ b/src/plugins/ctf/lttng-live/data-stream.h @@ -25,7 +25,7 @@ #include #include -#include +#include "common/babeltrace.h" #include #include "lttng-live.h" diff --git a/plugins/ctf/lttng-live/logging.c b/src/plugins/ctf/lttng-live/logging.c similarity index 96% rename from plugins/ctf/lttng-live/logging.c rename to src/plugins/ctf/lttng-live/logging.c index bb081590..98f1b639 100644 --- a/plugins/ctf/lttng-live/logging.c +++ b/src/plugins/ctf/lttng-live/logging.c @@ -21,6 +21,6 @@ */ #define BT_LOG_OUTPUT_LEVEL lttng_live_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(lttng_live_log_level, "BABELTRACE_SRC_CTF_LTTNG_LIVE_LOG_LEVEL"); diff --git a/plugins/ctf/lttng-live/logging.h b/src/plugins/ctf/lttng-live/logging.h similarity index 96% rename from plugins/ctf/lttng-live/logging.h rename to src/plugins/ctf/lttng-live/logging.h index cd9b071d..de11a5ed 100644 --- a/plugins/ctf/lttng-live/logging.h +++ b/src/plugins/ctf/lttng-live/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL lttng_live_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(lttng_live_log_level); diff --git a/plugins/ctf/lttng-live/lttng-live.c b/src/plugins/ctf/lttng-live/lttng-live.c similarity index 99% rename from plugins/ctf/lttng-live/lttng-live.c rename to src/plugins/ctf/lttng-live/lttng-live.c index 24544a30..1a24a734 100644 --- a/plugins/ctf/lttng-live/lttng-live.c +++ b/src/plugins/ctf/lttng-live/lttng-live.c @@ -35,11 +35,11 @@ #include #include -#include +#include "common/assert.h" #include -#include +#include "compat/compiler.h" #include -#include +#include "plugins/plugins-common.h" #include "data-stream.h" #include "metadata.h" diff --git a/plugins/ctf/lttng-live/lttng-live.h b/src/plugins/ctf/lttng-live/lttng-live.h similarity index 99% rename from plugins/ctf/lttng-live/lttng-live.h rename to src/plugins/ctf/lttng-live/lttng-live.h index 67f021c6..5c8dc41b 100644 --- a/plugins/ctf/lttng-live/lttng-live.h +++ b/src/plugins/ctf/lttng-live/lttng-live.h @@ -31,7 +31,7 @@ #include -#include +#include "common/babeltrace.h" #include #include "../common/metadata/decoder.h" diff --git a/plugins/ctf/lttng-live/lttng-viewer-abi.h b/src/plugins/ctf/lttng-live/lttng-viewer-abi.h similarity index 99% rename from plugins/ctf/lttng-live/lttng-viewer-abi.h rename to src/plugins/ctf/lttng-live/lttng-viewer-abi.h index a05ed61f..9f6154ba 100644 --- a/plugins/ctf/lttng-live/lttng-viewer-abi.h +++ b/src/plugins/ctf/lttng-live/lttng-viewer-abi.h @@ -25,7 +25,7 @@ * SOFTWARE. */ -#include +#include "compat/limits.h" #define LTTNG_VIEWER_PATH_MAX 4096 #define LTTNG_VIEWER_NAME_MAX 255 diff --git a/plugins/ctf/lttng-live/metadata.c b/src/plugins/ctf/lttng-live/metadata.c similarity index 99% rename from plugins/ctf/lttng-live/metadata.c rename to src/plugins/ctf/lttng-live/metadata.c index 14088bbd..2d605e15 100644 --- a/plugins/ctf/lttng-live/metadata.c +++ b/src/plugins/ctf/lttng-live/metadata.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include "compat/memstream.h" #include #include "metadata.h" diff --git a/plugins/ctf/lttng-live/metadata.h b/src/plugins/ctf/lttng-live/metadata.h similarity index 97% rename from plugins/ctf/lttng-live/metadata.h rename to src/plugins/ctf/lttng-live/metadata.h index 2a81c884..2cf8ae19 100644 --- a/plugins/ctf/lttng-live/metadata.h +++ b/src/plugins/ctf/lttng-live/metadata.h @@ -25,7 +25,7 @@ #include #include -#include +#include "common/babeltrace.h" #include #include "lttng-live.h" diff --git a/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c similarity index 99% rename from plugins/ctf/lttng-live/viewer-connection.c rename to src/plugins/ctf/lttng-live/viewer-connection.c index e11fe7eb..4a74ff9f 100644 --- a/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -34,10 +34,10 @@ #include #include -#include -#include -#include -#include +#include "compat/socket.h" +#include "compat/endian.h" +#include "compat/compiler.h" +#include "common/common.h" #include #include "lttng-live.h" diff --git a/plugins/ctf/lttng-live/viewer-connection.h b/src/plugins/ctf/lttng-live/viewer-connection.h similarity index 95% rename from plugins/ctf/lttng-live/viewer-connection.h rename to src/plugins/ctf/lttng-live/viewer-connection.h index 752d1a91..09adc6cf 100644 --- a/plugins/ctf/lttng-live/viewer-connection.h +++ b/src/plugins/ctf/lttng-live/viewer-connection.h @@ -26,12 +26,12 @@ #include #include -#include -#include +#include "common/babeltrace.h" +#include "compat/socket.h" //TODO: this should not be used by plugins. Should copy code into plugin //instead. -#include +#include "lib/object.h" #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344 diff --git a/plugins/ctf/plugin.c b/src/plugins/ctf/plugin.c similarity index 100% rename from plugins/ctf/plugin.c rename to src/plugins/ctf/plugin.c diff --git a/plugins/ctf/print.h b/src/plugins/ctf/print.h similarity index 100% rename from plugins/ctf/print.h rename to src/plugins/ctf/print.h diff --git a/plugins/lttng-utils/Makefile.am b/src/plugins/lttng-utils/Makefile.am similarity index 73% rename from plugins/lttng-utils/Makefile.am rename to src/plugins/lttng-utils/Makefile.am index 1d555a55..d7d980ae 100644 --- a/plugins/lttng-utils/Makefile.am +++ b/src/plugins/lttng-utils/Makefile.am @@ -8,8 +8,6 @@ babeltrace_plugin_lttng_utils_la_LIBADD += \ debug-info/libdebug-info.la endif -AM_CPPFLAGS += -I$(top_srcdir)/plugins - plugindir = "$(PLUGINSDIR)" plugin_LTLIBRARIES = babeltrace-plugin-lttng-utils.la @@ -23,7 +21,7 @@ babeltrace_plugin_lttng_utils_la_LDFLAGS = \ if !ENABLE_BUILT_IN_PLUGINS babeltrace_plugin_lttng_utils_la_LIBADD += \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la endif diff --git a/plugins/lttng-utils/debug-info/Makefile.am b/src/plugins/lttng-utils/debug-info/Makefile.am similarity index 83% rename from plugins/lttng-utils/debug-info/Makefile.am rename to src/plugins/lttng-utils/debug-info/Makefile.am index 0dea0a46..a231785b 100644 --- a/plugins/lttng-utils/debug-info/Makefile.am +++ b/src/plugins/lttng-utils/debug-info/Makefile.am @@ -1,9 +1,7 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libdebug-info.la libdebug_info_la_LIBADD = \ - $(top_builddir)/fd-cache/libbabeltrace2-fd-cache.la + $(top_builddir)/src/fd-cache/libbabeltrace2-fd-cache.la libdebug_info_la_SOURCES = \ bin-info.c \ diff --git a/plugins/lttng-utils/debug-info/bin-info.c b/src/plugins/lttng-utils/debug-info/bin-info.c similarity index 99% rename from plugins/lttng-utils/debug-info/bin-info.c rename to src/plugins/lttng-utils/debug-info/bin-info.c index bad796d2..2ecffdf8 100644 --- a/plugins/lttng-utils/debug-info/bin-info.c +++ b/src/plugins/lttng-utils/debug-info/bin-info.c @@ -42,7 +42,7 @@ #include -#include +#include "common/common.h" #include "bin-info.h" #include "crc32.h" diff --git a/plugins/lttng-utils/debug-info/bin-info.h b/src/plugins/lttng-utils/debug-info/bin-info.h similarity index 98% rename from plugins/lttng-utils/debug-info/bin-info.h rename to src/plugins/lttng-utils/debug-info/bin-info.h index c193a06d..bf473690 100644 --- a/plugins/lttng-utils/debug-info/bin-info.h +++ b/src/plugins/lttng-utils/debug-info/bin-info.h @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include "common/babeltrace.h" +#include "fd-cache/fd-cache.h" #define DEFAULT_DEBUG_DIR "/usr/lib/debug" #define DEBUG_SUBDIR ".debug" diff --git a/plugins/lttng-utils/debug-info/crc32.c b/src/plugins/lttng-utils/debug-info/crc32.c similarity index 100% rename from plugins/lttng-utils/debug-info/crc32.c rename to src/plugins/lttng-utils/debug-info/crc32.c diff --git a/plugins/lttng-utils/debug-info/crc32.h b/src/plugins/lttng-utils/debug-info/crc32.h similarity index 98% rename from plugins/lttng-utils/debug-info/crc32.h rename to src/plugins/lttng-utils/debug-info/crc32.h index 3cb825e4..73438192 100644 --- a/plugins/lttng-utils/debug-info/crc32.h +++ b/src/plugins/lttng-utils/debug-info/crc32.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include "common/babeltrace.h" /** * Compute a 32-bit cyclic redundancy checksum for a given file. diff --git a/plugins/lttng-utils/debug-info/debug-info.c b/src/plugins/lttng-utils/debug-info/debug-info.c similarity index 99% rename from plugins/lttng-utils/debug-info/debug-info.c rename to src/plugins/lttng-utils/debug-info/debug-info.c index 1e7a2381..297be248 100644 --- a/plugins/lttng-utils/debug-info/debug-info.c +++ b/src/plugins/lttng-utils/debug-info/debug-info.c @@ -30,11 +30,11 @@ #include "logging.h" #include -#include +#include "plugins/plugins-common.h" -#include -#include -#include +#include "common/assert.h" +#include "common/common.h" +#include "fd-cache/fd-cache.h" #include "bin-info.h" #include "debug-info.h" diff --git a/plugins/lttng-utils/debug-info/debug-info.h b/src/plugins/lttng-utils/debug-info/debug-info.h similarity index 98% rename from plugins/lttng-utils/debug-info/debug-info.h rename to src/plugins/lttng-utils/debug-info/debug-info.h index f97d32d2..ef99f718 100644 --- a/plugins/lttng-utils/debug-info/debug-info.h +++ b/src/plugins/lttng-utils/debug-info/debug-info.h @@ -29,7 +29,7 @@ #include #include -#include +#include "common/babeltrace.h" #define VPID_FIELD_NAME "vpid" #define IP_FIELD_NAME "ip" diff --git a/plugins/lttng-utils/debug-info/dwarf.c b/src/plugins/lttng-utils/debug-info/dwarf.c similarity index 100% rename from plugins/lttng-utils/debug-info/dwarf.c rename to src/plugins/lttng-utils/debug-info/dwarf.c diff --git a/plugins/lttng-utils/debug-info/dwarf.h b/src/plugins/lttng-utils/debug-info/dwarf.h similarity index 99% rename from plugins/lttng-utils/debug-info/dwarf.h rename to src/plugins/lttng-utils/debug-info/dwarf.h index 72bb8d2b..4ab527b0 100644 --- a/plugins/lttng-utils/debug-info/dwarf.h +++ b/src/plugins/lttng-utils/debug-info/dwarf.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include "common/babeltrace.h" /* * bt_dwarf is a wrapper over libdw providing a nicer, higher-level diff --git a/plugins/lttng-utils/debug-info/logging.c b/src/plugins/lttng-utils/debug-info/logging.c similarity index 96% rename from plugins/lttng-utils/debug-info/logging.c rename to src/plugins/lttng-utils/debug-info/logging.c index d7befe94..a872d571 100644 --- a/plugins/lttng-utils/debug-info/logging.c +++ b/src/plugins/lttng-utils/debug-info/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_lttng_utils_debug_info_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_lttng_utils_debug_info_log_level, "BABELTRACE_FLT_LTTNG_UTILS_DEBUG_INFO_LOG_LEVEL"); diff --git a/plugins/lttng-utils/debug-info/logging.h b/src/plugins/lttng-utils/debug-info/logging.h similarity index 97% rename from plugins/lttng-utils/debug-info/logging.h rename to src/plugins/lttng-utils/debug-info/logging.h index 154ca0ff..fa298d54 100644 --- a/plugins/lttng-utils/debug-info/logging.h +++ b/src/plugins/lttng-utils/debug-info/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_lttng_utils_debug_info_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_lttng_utils_debug_info_log_level); diff --git a/plugins/lttng-utils/debug-info/trace-ir-data-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c similarity index 99% rename from plugins/lttng-utils/debug-info/trace-ir-data-copy.c rename to src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c index 8eb2eddf..c677770d 100644 --- a/plugins/lttng-utils/debug-info/trace-ir-data-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c @@ -29,7 +29,7 @@ #include #include -#include +#include "common/assert.h" #include "trace-ir-data-copy.h" diff --git a/plugins/lttng-utils/debug-info/trace-ir-data-copy.h b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.h similarity index 100% rename from plugins/lttng-utils/debug-info/trace-ir-data-copy.h rename to src/plugins/lttng-utils/debug-info/trace-ir-data-copy.h diff --git a/plugins/lttng-utils/debug-info/trace-ir-mapping.c b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c similarity index 99% rename from plugins/lttng-utils/debug-info/trace-ir-mapping.c rename to src/plugins/lttng-utils/debug-info/trace-ir-mapping.c index 61bfb016..67b24f84 100644 --- a/plugins/lttng-utils/debug-info/trace-ir-mapping.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c @@ -30,7 +30,7 @@ #include -#include +#include "common/assert.h" #include /* For bt_property_availability */ #include diff --git a/plugins/lttng-utils/debug-info/trace-ir-mapping.h b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h similarity index 99% rename from plugins/lttng-utils/debug-info/trace-ir-mapping.h rename to src/plugins/lttng-utils/debug-info/trace-ir-mapping.h index 0f29e23e..9691785b 100644 --- a/plugins/lttng-utils/debug-info/trace-ir-mapping.h +++ b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h @@ -24,7 +24,7 @@ #include -#include +#include "common/assert.h" #include #include "debug-info.h" diff --git a/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c similarity index 99% rename from plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c rename to src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c index 55bb953a..92bc3de8 100644 --- a/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c @@ -30,7 +30,7 @@ #include #include -#include +#include "common/assert.h" #include "trace-ir-metadata-copy.h" #include "trace-ir-metadata-field-class-copy.h" diff --git a/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.h b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.h similarity index 100% rename from plugins/lttng-utils/debug-info/trace-ir-metadata-copy.h rename to src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.h diff --git a/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c similarity index 99% rename from plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c rename to src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c index 1247e598..70242d66 100644 --- a/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c @@ -27,9 +27,9 @@ #define BT_LOG_TAG "PLUGIN-LTTNG-UTILS-DEBUG-INFO-TRACE-IR-METADATA-FC-COPY" #include "logging.h" -#include -#include -#include +#include "common/assert.h" +#include "common/common.h" +#include "compat/compiler.h" #include #include "trace-ir-metadata-copy.h" diff --git a/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h similarity index 100% rename from plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h rename to src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h diff --git a/plugins/lttng-utils/debug-info/utils.c b/src/plugins/lttng-utils/debug-info/utils.c similarity index 100% rename from plugins/lttng-utils/debug-info/utils.c rename to src/plugins/lttng-utils/debug-info/utils.c diff --git a/plugins/lttng-utils/debug-info/utils.h b/src/plugins/lttng-utils/debug-info/utils.h similarity index 97% rename from plugins/lttng-utils/debug-info/utils.h rename to src/plugins/lttng-utils/debug-info/utils.h index 82820fc0..393f34eb 100644 --- a/plugins/lttng-utils/debug-info/utils.h +++ b/src/plugins/lttng-utils/debug-info/utils.h @@ -26,7 +26,7 @@ * SOFTWARE. */ -#include +#include "common/babeltrace.h" #include "trace-ir-mapping.h" /* diff --git a/plugins/lttng-utils/plugin.c b/src/plugins/lttng-utils/plugin.c similarity index 100% rename from plugins/lttng-utils/plugin.c rename to src/plugins/lttng-utils/plugin.c diff --git a/plugins/plugins-common.h b/src/plugins/plugins-common.h similarity index 100% rename from plugins/plugins-common.h rename to src/plugins/plugins-common.h diff --git a/plugins/text/Makefile.am b/src/plugins/text/Makefile.am similarity index 66% rename from plugins/text/Makefile.am rename to src/plugins/text/Makefile.am index c9b26c26..f7179107 100644 --- a/plugins/text/Makefile.am +++ b/src/plugins/text/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - SUBDIRS = pretty dmesg plugindir = "$(PLUGINSDIR)" @@ -16,8 +14,8 @@ babeltrace_plugin_text_la_LIBADD = \ if !ENABLE_BUILT_IN_PLUGINS babeltrace_plugin_text_la_LIBADD += \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/compat/libcompat.la + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/compat/libcompat.la endif diff --git a/plugins/text/dmesg/Makefile.am b/src/plugins/text/dmesg/Makefile.am similarity index 81% rename from plugins/text/dmesg/Makefile.am rename to src/plugins/text/dmesg/Makefile.am index 6e0f12ad..6f168b38 100644 --- a/plugins/text/dmesg/Makefile.am +++ b/src/plugins/text/dmesg/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-text-dmesg-cc.la # ctf-text plugin diff --git a/plugins/text/dmesg/dmesg.c b/src/plugins/text/dmesg/dmesg.c similarity index 99% rename from plugins/text/dmesg/dmesg.c rename to src/plugins/text/dmesg/dmesg.c index b10c9425..7ed01cdc 100644 --- a/plugins/text/dmesg/dmesg.c +++ b/src/plugins/text/dmesg/dmesg.c @@ -28,12 +28,12 @@ #include #include #include -#include -#include +#include "common/assert.h" +#include "common/common.h" #include -#include -#include -#include +#include "lib/value.h" +#include "compat/utc.h" +#include "compat/stdio.h" #include #define NSEC_PER_USEC 1000UL diff --git a/plugins/text/dmesg/dmesg.h b/src/plugins/text/dmesg/dmesg.h similarity index 98% rename from plugins/text/dmesg/dmesg.h rename to src/plugins/text/dmesg/dmesg.h index 6e75ea44..6fc5ddef 100644 --- a/plugins/text/dmesg/dmesg.h +++ b/src/plugins/text/dmesg/dmesg.h @@ -24,7 +24,7 @@ */ #include -#include +#include "common/babeltrace.h" #include BT_HIDDEN diff --git a/plugins/text/dmesg/logging.c b/src/plugins/text/dmesg/logging.c similarity index 96% rename from plugins/text/dmesg/logging.c rename to src/plugins/text/dmesg/logging.c index 3df7f49e..cf042507 100644 --- a/plugins/text/dmesg/logging.c +++ b/src/plugins/text/dmesg/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_text_dmesg_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_text_dmesg_log_level, "BABELTRACE_SRC_TEXT_DMESG_LOG_LEVEL"); diff --git a/plugins/text/dmesg/logging.h b/src/plugins/text/dmesg/logging.h similarity index 97% rename from plugins/text/dmesg/logging.h rename to src/plugins/text/dmesg/logging.h index 564479dd..1facad3e 100644 --- a/plugins/text/dmesg/logging.h +++ b/src/plugins/text/dmesg/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_text_dmesg_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_text_dmesg_log_level); diff --git a/plugins/text/plugin.c b/src/plugins/text/plugin.c similarity index 100% rename from plugins/text/plugin.c rename to src/plugins/text/plugin.c diff --git a/plugins/text/pretty/Makefile.am b/src/plugins/text/pretty/Makefile.am similarity index 82% rename from plugins/text/pretty/Makefile.am rename to src/plugins/text/pretty/Makefile.am index 72c0ab10..37000e13 100644 --- a/plugins/text/pretty/Makefile.am +++ b/src/plugins/text/pretty/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-text-pretty-cc.la # ctf-text plugin diff --git a/plugins/text/pretty/logging.c b/src/plugins/text/pretty/logging.c similarity index 96% rename from plugins/text/pretty/logging.c rename to src/plugins/text/pretty/logging.c index 37beb6d3..03dd9c15 100644 --- a/plugins/text/pretty/logging.c +++ b/src/plugins/text/pretty/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_text_pretty_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_text_pretty_log_level, "BABELTRACE_SINK_TEXT_PRETTY_LOG_LEVEL"); diff --git a/plugins/text/pretty/logging.h b/src/plugins/text/pretty/logging.h similarity index 97% rename from plugins/text/pretty/logging.h rename to src/plugins/text/pretty/logging.h index 5ac1f7b4..61d4f2b4 100644 --- a/plugins/text/pretty/logging.h +++ b/src/plugins/text/pretty/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_text_pretty_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_text_pretty_log_level); diff --git a/plugins/text/pretty/pretty.c b/src/plugins/text/pretty/pretty.c similarity index 99% rename from plugins/text/pretty/pretty.c rename to src/plugins/text/pretty/pretty.c index 7c548391..9db8770e 100644 --- a/plugins/text/pretty/pretty.c +++ b/src/plugins/text/pretty/pretty.c @@ -27,13 +27,13 @@ #include "logging.h" #include -#include -#include -#include +#include "compat/compiler.h" +#include "common/common.h" +#include "plugins/plugins-common.h" #include #include #include -#include +#include "common/assert.h" #include "pretty.h" diff --git a/plugins/text/pretty/pretty.h b/src/plugins/text/pretty/pretty.h similarity index 98% rename from plugins/text/pretty/pretty.h rename to src/plugins/text/pretty/pretty.h index 4ebf54b3..e3a24106 100644 --- a/plugins/text/pretty/pretty.h +++ b/src/plugins/text/pretty/pretty.h @@ -26,7 +26,7 @@ */ #include -#include +#include "common/babeltrace.h" #include enum pretty_default { diff --git a/plugins/text/pretty/print.c b/src/plugins/text/pretty/print.c similarity index 99% rename from plugins/text/pretty/print.c rename to src/plugins/text/pretty/print.c index a30f3a36..388a0915 100644 --- a/plugins/text/pretty/print.c +++ b/src/plugins/text/pretty/print.c @@ -24,10 +24,10 @@ */ #include -#include -#include -#include -#include +#include "compat/bitfield.h" +#include "common/common.h" +#include "compat/time.h" +#include "common/assert.h" #include #include #include "pretty.h" diff --git a/plugins/utils/Makefile.am b/src/plugins/utils/Makefile.am similarity index 68% rename from plugins/utils/Makefile.am rename to src/plugins/utils/Makefile.am index 9211dd9e..67f34f22 100644 --- a/plugins/utils/Makefile.am +++ b/src/plugins/utils/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - -SUBDIRS = dummy muxer counter trimmer . +SUBDIRS = dummy muxer counter trimmer plugindir = "$(PLUGINSDIR)" plugin_LTLIBRARIES = babeltrace-plugin-utils.la @@ -17,7 +15,7 @@ babeltrace_plugin_utils_la_LIBADD = \ if !ENABLE_BUILT_IN_PLUGINS babeltrace_plugin_utils_la_LIBADD += \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la endif diff --git a/plugins/utils/counter/Makefile.am b/src/plugins/utils/counter/Makefile.am similarity index 79% rename from plugins/utils/counter/Makefile.am rename to src/plugins/utils/counter/Makefile.am index 67d1656d..ef060f1a 100644 --- a/plugins/utils/counter/Makefile.am +++ b/src/plugins/utils/counter/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-counter-cc.la libbabeltrace2_plugin_counter_cc_la_SOURCES = \ counter.c \ diff --git a/plugins/utils/counter/counter.c b/src/plugins/utils/counter/counter.c similarity index 98% rename from plugins/utils/counter/counter.c rename to src/plugins/utils/counter/counter.c index 5a6eadaf..37ddd030 100644 --- a/plugins/utils/counter/counter.c +++ b/src/plugins/utils/counter/counter.c @@ -24,10 +24,10 @@ #include "logging.h" #include -#include -#include -#include -#include +#include "common/babeltrace.h" +#include "common/common.h" +#include "plugins/plugins-common.h" +#include "common/assert.h" #include #include diff --git a/plugins/utils/counter/counter.h b/src/plugins/utils/counter/counter.h similarity index 100% rename from plugins/utils/counter/counter.h rename to src/plugins/utils/counter/counter.h diff --git a/plugins/utils/counter/logging.c b/src/plugins/utils/counter/logging.c similarity index 96% rename from plugins/utils/counter/logging.c rename to src/plugins/utils/counter/logging.c index 42de03f8..6fc046e1 100644 --- a/plugins/utils/counter/logging.c +++ b/src/plugins/utils/counter/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_counter_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_utils_counter_log_level, "BABELTRACE_FLT_UTILS_COUNTER_LOG_LEVEL"); diff --git a/src/plugins/utils/counter/logging.h b/src/plugins/utils/counter/logging.h new file mode 100644 index 00000000..83192434 --- /dev/null +++ b/src/plugins/utils/counter/logging.h @@ -0,0 +1,31 @@ +#ifndef PLUGINS_UTILS_COUNTER_LOGGING_H +#define PLUGINS_UTILS_COUNTER_LOGGING_H + +/* + * Copyright (c) 2017 Philippe Proulx + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_counter_log_level +#include "logging/log.h" + +BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_utils_counter_log_level); + +#endif /* PLUGINS_UTILS_COUNTER_LOGGING_H */ diff --git a/plugins/utils/dummy/Makefile.am b/src/plugins/utils/dummy/Makefile.am similarity index 74% rename from plugins/utils/dummy/Makefile.am rename to src/plugins/utils/dummy/Makefile.am index 197aaa12..c0eb371f 100644 --- a/plugins/utils/dummy/Makefile.am +++ b/src/plugins/utils/dummy/Makefile.am @@ -1,4 +1,2 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-dummy-cc.la libbabeltrace2_plugin_dummy_cc_la_SOURCES = dummy.c dummy.h diff --git a/plugins/utils/dummy/dummy.c b/src/plugins/utils/dummy/dummy.c similarity index 97% rename from plugins/utils/dummy/dummy.c rename to src/plugins/utils/dummy/dummy.c index 59d85152..5da07ea2 100644 --- a/plugins/utils/dummy/dummy.c +++ b/src/plugins/utils/dummy/dummy.c @@ -21,9 +21,9 @@ */ #include -#include -#include -#include +#include "common/babeltrace.h" +#include "plugins/plugins-common.h" +#include "common/assert.h" #include "dummy.h" static diff --git a/plugins/utils/dummy/dummy.h b/src/plugins/utils/dummy/dummy.h similarity index 97% rename from plugins/utils/dummy/dummy.h rename to src/plugins/utils/dummy/dummy.h index dfe21d18..ea44ecb9 100644 --- a/plugins/utils/dummy/dummy.h +++ b/src/plugins/utils/dummy/dummy.h @@ -25,7 +25,7 @@ #include #include -#include +#include "common/babeltrace.h" #include struct dummy { diff --git a/plugins/utils/muxer/Makefile.am b/src/plugins/utils/muxer/Makefile.am similarity index 76% rename from plugins/utils/muxer/Makefile.am rename to src/plugins/utils/muxer/Makefile.am index 9c305bcd..3eeb008a 100644 --- a/plugins/utils/muxer/Makefile.am +++ b/src/plugins/utils/muxer/Makefile.am @@ -1,4 +1,2 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins - noinst_LTLIBRARIES = libbabeltrace2-plugin-muxer.la libbabeltrace2_plugin_muxer_la_SOURCES = muxer.c muxer.h logging.c logging.h diff --git a/plugins/utils/muxer/logging.c b/src/plugins/utils/muxer/logging.c similarity index 96% rename from plugins/utils/muxer/logging.c rename to src/plugins/utils/muxer/logging.c index 3f16b977..1bf5383c 100644 --- a/plugins/utils/muxer/logging.c +++ b/src/plugins/utils/muxer/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_muxer_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_utils_muxer_log_level, "BABELTRACE_FLT_UTILS_MUXER_LOG_LEVEL"); diff --git a/plugins/utils/counter/logging.h b/src/plugins/utils/muxer/logging.h similarity index 97% rename from plugins/utils/counter/logging.h rename to src/plugins/utils/muxer/logging.h index 176122f5..ebb3538a 100644 --- a/plugins/utils/counter/logging.h +++ b/src/plugins/utils/muxer/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_muxer_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_utils_muxer_log_level); diff --git a/plugins/utils/muxer/muxer.c b/src/plugins/utils/muxer/muxer.c similarity index 99% rename from plugins/utils/muxer/muxer.c rename to src/plugins/utils/muxer/muxer.c index 626c437b..b575f967 100644 --- a/plugins/utils/muxer/muxer.c +++ b/src/plugins/utils/muxer/muxer.c @@ -23,19 +23,19 @@ #define BT_LOG_TAG "PLUGIN-UTILS-MUXER-FLT" #include "logging.h" -#include -#include +#include "common/babeltrace.h" +#include "compat/uuid.h" #include -#include -#include -#include -#include -#include +#include "lib/value.h" +#include "lib/graph/component.h" +#include "lib/graph/message/iterator.h" +#include "lib/graph/connection.h" +#include "plugins/plugins-common.h" #include #include #include -#include -#include +#include "common/assert.h" +#include "common/common.h" #include #include diff --git a/plugins/utils/muxer/muxer.h b/src/plugins/utils/muxer/muxer.h similarity index 98% rename from plugins/utils/muxer/muxer.h rename to src/plugins/utils/muxer/muxer.h index 23ec8c20..a383e4c2 100644 --- a/plugins/utils/muxer/muxer.h +++ b/src/plugins/utils/muxer/muxer.h @@ -26,7 +26,7 @@ #include #include -#include +#include "common/babeltrace.h" BT_HIDDEN bt_self_component_status muxer_init( diff --git a/plugins/utils/plugin.c b/src/plugins/utils/plugin.c similarity index 100% rename from plugins/utils/plugin.c rename to src/plugins/utils/plugin.c diff --git a/plugins/utils/trimmer/Makefile.am b/src/plugins/utils/trimmer/Makefile.am similarity index 63% rename from plugins/utils/trimmer/Makefile.am rename to src/plugins/utils/trimmer/Makefile.am index 050db0c4..9ce4c9b2 100644 --- a/plugins/utils/trimmer/Makefile.am +++ b/src/plugins/utils/trimmer/Makefile.am @@ -1,6 +1,3 @@ -AM_CPPFLAGS += -I$(top_srcdir)/plugins \ - -I$(top_srcdir)/plugins/libctfcopytrace - noinst_LTLIBRARIES = libbabeltrace2-plugin-trimmer.la libbabeltrace2_plugin_trimmer_la_SOURCES = \ trimmer.c \ diff --git a/plugins/utils/trimmer/logging.c b/src/plugins/utils/trimmer/logging.c similarity index 96% rename from plugins/utils/trimmer/logging.c rename to src/plugins/utils/trimmer/logging.c index f8b9be15..f6721231 100644 --- a/plugins/utils/trimmer/logging.c +++ b/src/plugins/utils/trimmer/logging.c @@ -21,7 +21,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_trimmer_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(bt_plugin_utils_trimmer_log_level, "BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL"); diff --git a/plugins/utils/trimmer/logging.h b/src/plugins/utils/trimmer/logging.h similarity index 97% rename from plugins/utils/trimmer/logging.h rename to src/plugins/utils/trimmer/logging.h index 3bcd7ea8..aba659b9 100644 --- a/plugins/utils/trimmer/logging.h +++ b/src/plugins/utils/trimmer/logging.h @@ -24,7 +24,7 @@ */ #define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_trimmer_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_utils_trimmer_log_level); diff --git a/plugins/utils/trimmer/trimmer.c b/src/plugins/utils/trimmer/trimmer.c similarity index 99% rename from plugins/utils/trimmer/trimmer.c rename to src/plugins/utils/trimmer/trimmer.c index 1227dc50..f2d2c434 100644 --- a/plugins/utils/trimmer/trimmer.c +++ b/src/plugins/utils/trimmer/trimmer.c @@ -24,12 +24,12 @@ #define BT_LOG_TAG "PLUGIN-UTILS-TRIMMER-FLT" #include "logging.h" -#include -#include +#include "compat/utc.h" +#include "compat/time.h" #include -#include -#include -#include +#include "common/common.h" +#include "plugins/plugins-common.h" +#include "common/assert.h" #include #include #include diff --git a/plugins/utils/trimmer/trimmer.h b/src/plugins/utils/trimmer/trimmer.h similarity index 97% rename from plugins/utils/trimmer/trimmer.h rename to src/plugins/utils/trimmer/trimmer.h index e792c3e5..27f23294 100644 --- a/plugins/utils/trimmer/trimmer.h +++ b/src/plugins/utils/trimmer/trimmer.h @@ -28,7 +28,7 @@ */ #include -#include +#include "common/babeltrace.h" #include BT_HIDDEN diff --git a/python-plugin-provider/Makefile.am b/src/python-plugin-provider/Makefile.am similarity index 73% rename from python-plugin-provider/Makefile.am rename to src/python-plugin-provider/Makefile.am index 2a269f0f..e388406a 100644 --- a/python-plugin-provider/Makefile.am +++ b/src/python-plugin-provider/Makefile.am @@ -4,7 +4,9 @@ AM_CPPFLAGS += $(PYTHON_INCLUDE) lib_LTLIBRARIES = libbabeltrace2-python-plugin-provider.la libbabeltrace2_python_plugin_provider_la_SOURCES = \ - python-plugin-provider.c + python-plugin-provider.c \ + python-plugin-provider.h + libbabeltrace2_python_plugin_provider_la_LDFLAGS = \ $(LT_NO_UNDEFINED) \ -version-info $(BABELTRACE_LIBRARY_VERSION) \ @@ -16,8 +18,8 @@ libbabeltrace2_python_plugin_provider_la_LIBADD = # when it's not built-in the babeltrace2 executable. if !ENABLE_BUILT_IN_PLUGINS libbabeltrace2_python_plugin_provider_la_LIBADD += \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/lib/libbabeltrace2.la endif endif # ENABLE_PYTHON_PLUGINS diff --git a/python-plugin-provider/python-plugin-provider.c b/src/python-plugin-provider/python-plugin-provider.c similarity index 98% rename from python-plugin-provider/python-plugin-provider.c rename to src/python-plugin-provider/python-plugin-provider.c index 8e5ee08e..35f87555 100644 --- a/python-plugin-provider/python-plugin-provider.c +++ b/src/python-plugin-provider/python-plugin-provider.c @@ -26,12 +26,12 @@ #define BT_LOG_TAG "PLUGIN-PY" -#include -#include +#include "common/babeltrace.h" +#include "compat/compiler.h" #include -#include +#include "lib/plugin/plugin.h" #include -#include +#include "lib/graph/component-class.h" #include #include #include diff --git a/include/babeltrace2/plugin/python-plugin-provider-internal.h b/src/python-plugin-provider/python-plugin-provider.h similarity index 100% rename from include/babeltrace2/plugin/python-plugin-provider-internal.h rename to src/python-plugin-provider/python-plugin-provider.h diff --git a/tests/bindings/python/bt2/test_python_bt2.in b/tests/bindings/python/bt2/test_python_bt2.in index d627714f..e9941018 100644 --- a/tests/bindings/python/bt2/test_python_bt2.in +++ b/tests/bindings/python/bt2/test_python_bt2.in @@ -25,18 +25,18 @@ check_coverage() { } export BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1 -export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/plugins" -export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/plugins/ctf:${BT_BUILD_PATH}/plugins/utils:${BT_BUILD_PATH}/plugins/text" +export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/src/plugins" +export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/text" export TEST_CTF_TRACES_PATH="${BT_SRC_PATH}/tests/ctf-traces" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py" THIS_DIR="${BT_SRC_PATH}/tests/bindings/python/bt2" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${LD_LIBRARY_PATH}" fi if test "x${TESTALL_COVERAGE}" = "x1"; then diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 9cb75b00..679fda2b 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -13,17 +13,17 @@ test_bitfield_LDADD = $(LIBTAP) $(builddir)/libtestcommon.la test_ctf_writer_LDADD = \ $(COMMON_TEST_LDADD) \ - $(top_builddir)/ctf-writer/libbabeltrace2-ctf-writer.la + $(top_builddir)/src/ctf-writer/libbabeltrace2-ctf-writer.la test_bt_values_LDADD = $(COMMON_TEST_LDADD) \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/lib/libbabeltrace2.la test_trace_ir_ref_LDADD = $(COMMON_TEST_LDADD) \ - $(top_builddir)/lib/libbabeltrace2.la \ - $(top_builddir)/ctf-writer/libbabeltrace2-ctf-writer.la + $(top_builddir)/src/lib/libbabeltrace2.la \ + $(top_builddir)/src/ctf-writer/libbabeltrace2-ctf-writer.la test_graph_topo_LDADD = $(COMMON_TEST_LDADD) \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/lib/libbabeltrace2.la noinst_PROGRAMS = test_bitfield test_ctf_writer test_bt_values \ test_trace_ir_ref test_graph_topo @@ -37,7 +37,7 @@ test_graph_topo_SOURCES = test_graph_topo.c if !ENABLE_BUILT_IN_PLUGINS noinst_PROGRAMS += test_plugin test_plugin_LDADD = $(COMMON_TEST_LDADD) \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/lib/libbabeltrace2.la test_plugin_SOURCES = test_plugin.c SUBDIRS += test-plugin-plugins endif diff --git a/tests/lib/test-plugin-plugins/Makefile.am b/tests/lib/test-plugin-plugins/Makefile.am index 3a185b27..c852655d 100644 --- a/tests/lib/test-plugin-plugins/Makefile.am +++ b/tests/lib/test-plugin-plugins/Makefile.am @@ -6,7 +6,7 @@ plugin_minimal_la_LDFLAGS = \ $(LT_NO_UNDEFINED) \ -rpath / -avoid-version -module plugin_minimal_la_LIBADD = \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/lib/libbabeltrace2.la # source/filter/sink plugin plugin_sfs_la_SOURCES = sfs.c @@ -14,4 +14,4 @@ plugin_sfs_la_LDFLAGS = \ $(LT_NO_UNDEFINED) \ -rpath / -avoid-version -module plugin_sfs_la_LIBADD = \ - $(top_builddir)/lib/libbabeltrace2.la + $(top_builddir)/src/lib/libbabeltrace2.la diff --git a/tests/lib/test-plugin-plugins/sfs.c b/tests/lib/test-plugin-plugins/sfs.c index d746afae..4431abc0 100644 --- a/tests/lib/test-plugin-plugins/sfs.c +++ b/tests/lib/test-plugin-plugins/sfs.c @@ -16,7 +16,7 @@ */ #include -#include +#include "common/assert.h" static bt_self_component_status sink_consume( bt_self_component_sink *self_comp) diff --git a/tests/lib/test_bitfield.c b/tests/lib/test_bitfield.c index 848d4bd3..b9bd6d40 100644 --- a/tests/lib/test_bitfield.c +++ b/tests/lib/test_bitfield.c @@ -19,7 +19,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include +#include "compat/bitfield.h" #include #include #include diff --git a/tests/lib/test_bt_values.c b/tests/lib/test_bt_values.c index f9526379..d16c67a5 100644 --- a/tests/lib/test_bt_values.c +++ b/tests/lib/test_bt_values.c @@ -21,7 +21,7 @@ */ #include -#include +#include "common/assert.h" #include #include "tap/tap.h" diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 75b914ce..1ed4cc67 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -32,12 +32,12 @@ #include #include #include -#include +#include "compat/stdlib.h" #include -#include -#include +#include "compat/limits.h" +#include "compat/stdio.h" #include -#include +#include "common/assert.h" #include #include "tap/tap.h" #include diff --git a/tests/lib/test_graph_topo.c b/tests/lib/test_graph_topo.c index b0409d49..7a85f511 100644 --- a/tests/lib/test_graph_topo.c +++ b/tests/lib/test_graph_topo.c @@ -18,7 +18,7 @@ */ #include -#include +#include "common/assert.h" #include #include #include diff --git a/tests/lib/test_plugin.c b/tests/lib/test_plugin.c index 852b26fb..39b054e5 100644 --- a/tests/lib/test_plugin.c +++ b/tests/lib/test_plugin.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include "common/assert.h" #include #include "tap/tap.h" #include "common.h" diff --git a/tests/lib/test_trace_ir_ref.c b/tests/lib/test_trace_ir_ref.c index 99a1d374..10916fba 100644 --- a/tests/lib/test_trace_ir_ref.c +++ b/tests/lib/test_trace_ir_ref.c @@ -21,9 +21,9 @@ #include "tap/tap.h" #include -#include -#include -#include +#include "lib/object.h" +#include "compat/stdlib.h" +#include "common/assert.h" #include #include #include diff --git a/tests/lib/trace-ir/test_trace_ir.in b/tests/lib/trace-ir/test_trace_ir.in index e78b3445..b4d49dc6 100644 --- a/tests/lib/trace-ir/test_trace_ir.in +++ b/tests/lib/trace-ir/test_trace_ir.in @@ -20,15 +20,15 @@ NO_SH_TAP=1 . "@abs_top_builddir@/tests/utils/common.sh" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py" THIS_DIR="${BT_SRC_PATH}/tests/lib/trace-ir" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${LD_LIBRARY_PATH}" fi PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}" \ diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am index b5d584b7..015f775f 100644 --- a/tests/plugins/Makefile.am +++ b/tests/plugins/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(top_srcdir)/plugins +AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(top_srcdir)/src/plugins LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la @@ -16,19 +16,19 @@ if ENABLE_DEBUG_INFO noinst_PROGRAMS += test_dwarf test_bin_info test_dwarf_LDADD = \ - $(top_builddir)/plugins/lttng-utils/debug-info/libdebug-info.la \ - $(top_builddir)/fd-cache/libbabeltrace2-fd-cache.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ + $(top_builddir)/src/plugins/lttng-utils/debug-info/libdebug-info.la \ + $(top_builddir)/src/fd-cache/libbabeltrace2-fd-cache.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ $(ELFUTILS_LIBS) \ $(LIBTAP) test_dwarf_SOURCES = test_dwarf.c test_bin_info_LDADD = \ - $(top_builddir)/plugins/lttng-utils/debug-info/libdebug-info.la \ - $(top_builddir)/fd-cache/libbabeltrace2-fd-cache.la \ - $(top_builddir)/logging/libbabeltrace2-logging.la \ - $(top_builddir)/common/libbabeltrace2-common.la \ + $(top_builddir)/src/plugins/lttng-utils/debug-info/libdebug-info.la \ + $(top_builddir)/src/fd-cache/libbabeltrace2-fd-cache.la \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ $(ELFUTILS_LIBS) \ $(LIBTAP) test_bin_info_SOURCES = test_bin_info.c diff --git a/tests/plugins/test_bin_info.c b/tests/plugins/test_bin_info.c index 7f873b36..a4c95d05 100644 --- a/tests/plugins/test_bin_info.c +++ b/tests/plugins/test_bin_info.c @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "common/babeltrace.h" +#include "common/assert.h" #include #include "tap/tap.h" diff --git a/tests/plugins/test_lttng_utils_debug_info.in b/tests/plugins/test_lttng_utils_debug_info.in index bb6b2d33..5d02aaee 100644 --- a/tests/plugins/test_lttng_utils_debug_info.in +++ b/tests/plugins/test_lttng_utils_debug_info.in @@ -20,17 +20,17 @@ NO_SH_TAP=1 . "@abs_top_builddir@/tests/utils/common.sh" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py" THIS_DIR="${BT_SRC_PATH}/tests/plugins" -export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/plugins/utils:${BT_BUILD_PATH}/plugins/ctf:${BT_BUILD_PATH}/plugins/lttng-utils" +export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/lttng-utils" export DEBUG_INFO_DATA_DIR="${BT_SRC_PATH}/tests/debug-info-data" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${LD_LIBRARY_PATH}" fi PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}" \ diff --git a/tests/python-plugin-provider/test_python_plugin_provider.in b/tests/python-plugin-provider/test_python_plugin_provider.in index 6f80f984..b6fc05a3 100644 --- a/tests/python-plugin-provider/test_python_plugin_provider.in +++ b/tests/python-plugin-provider/test_python_plugin_provider.in @@ -22,15 +22,15 @@ NO_SH_TAP=1 export PYTHON_PLUGIN_PROVIDER_TEST_PLUGIN_PATH="${BT_SRC_PATH}/tests/python-plugin-provider/bt_plugin_test_python_plugin_provider.py" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py" THIS_DIR="${BT_SRC_PATH}/tests/python-plugin-provider" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${BT_BUILD_PATH}/python-plugin-provider/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${BT_BUILD_PATH}/src/python-plugin-provider/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${BT_BUILD_PATH}/python-plugin-provider/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${BT_BUILD_PATH}/src/python-plugin-provider/.libs:${LD_LIBRARY_PATH}" fi PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}" \ diff --git a/tests/python-plugin-provider/test_python_plugin_provider_env.in b/tests/python-plugin-provider/test_python_plugin_provider_env.in index 84307786..4d585f05 100644 --- a/tests/python-plugin-provider/test_python_plugin_provider_env.in +++ b/tests/python-plugin-provider/test_python_plugin_provider_env.in @@ -21,14 +21,14 @@ export PYTHON_PLUGIN_PROVIDER_TEST_PLUGIN_PATH="${BT_SRC_PATH}/tests/python-plugin-provider/bt_plugin_test_python_plugin_provider.py" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" export PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${BT_BUILD_PATH}/python-plugin-provider/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${BT_BUILD_PATH}/src/python-plugin-provider/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${BT_BUILD_PATH}/python-plugin-provider/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${BT_BUILD_PATH}/src/python-plugin-provider/.libs:${LD_LIBRARY_PATH}" fi exec "$*" diff --git a/tests/utils/common.sh.in b/tests/utils/common.sh.in index 13de3679..976ef70e 100644 --- a/tests/utils/common.sh.in +++ b/tests/utils/common.sh.in @@ -3,7 +3,7 @@ BT_SRC_PATH="@abs_top_srcdir@" BT_BUILD_PATH="@abs_top_builddir@" -BT_BIN="${BT_BUILD_PATH}/cli/babeltrace2@EXEEXT@" +BT_BIN="${BT_BUILD_PATH}/src/cli/babeltrace2@EXEEXT@" BT_CTF_TRACES="${BT_SRC_PATH}/tests/ctf-traces" if [ "x${NO_SH_TAP}" = x ]; then diff --git a/tests/utils/test_python_bt2_env.in b/tests/utils/test_python_bt2_env.in index 03ac2522..d8e46b54 100644 --- a/tests/utils/test_python_bt2_env.in +++ b/tests/utils/test_python_bt2_env.in @@ -28,17 +28,17 @@ NO_SH_TAP=1 . "@abs_top_builddir@/tests/utils/common.sh" export BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1 -export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/plugins" -export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/plugins/ctf:${BT_BUILD_PATH}/plugins/utils:${BT_BUILD_PATH}/plugins/text" +export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/src/plugins" +export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/text" export TEST_CTF_TRACES_PATH="${BT_SRC_PATH}/tests/ctf-traces" -PYTHON_BUILD_DIR="${BT_BUILD_PATH}/bindings/python/bt2/build/build_lib" +PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib" TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python" export PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}" if [ "x${MSYSTEM}" != "x" ]; then - export PATH="${BT_BUILD_PATH}/lib/.libs:${PATH}" + export PATH="${BT_BUILD_PATH}/src/lib/.libs:${PATH}" else - export LD_LIBRARY_PATH="${BT_BUILD_PATH}/lib/.libs:${LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH="${BT_BUILD_PATH}/src/lib/.libs:${LD_LIBRARY_PATH}" fi exec "$@" -- 2.34.1