Rename bt_ctf_X -> bt_X, maintain backward compat. for pre-2.0 CTF writer
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 22 Sep 2017 00:51:34 +0000 (20:51 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Nov 2017 20:10:59 +0000 (16:10 -0400)
commit839d52a5c5c1fdd66cee9bf7d06c0c0acdd4c2a3
treefcb61102386a1ee94234565b4fc4f422bc8d7d88
parent0b0bf6828fd92630e50b6ea7474eacdff9264b5f
Rename bt_ctf_X -> bt_X, maintain backward compat. for pre-2.0 CTF writer

This patch replaces the `bt_ctf_` prefix with `bt_` for all the
functions, types, and enumerations. It also replaces the `BT_CTF_`
prefix with `BT_` for all the preprocessor definitions and enumerators.

Since there is only one IR as of Babeltrace 2, there is no need for this
superfluous prefix: there's no confusion without it, and it might even
be more straightforward for the newcomer to see `bt_trace` instead of
`bt_ctf_trace`, for example.

Backward compatibility is maintained with the help of specific
preprocessor definitions placed in each relevant public header file to
create aliases for legacy function names, type names, enumerator names,
and preprocessor definition names. Because Babeltrace 2 asks current
applications to be rebuilt anyway (soname is bumped), it is okay to lose
some symbol names as long as the API is equivalent.

The only possible issue that I can see is if an application uses a new
API name as a variable name, for example:

    struct bt_ctf_trace bt_ctf_trace;
    struct something_else bt_trace;

This is an error after this patch is applied because, after the
preprocessor pass, it is the equivalent of:

    struct bt_trace bt_trace;
    struct something_else bt_trace;

because of (include/babeltrace/ctf-ir/trace.h):

    #define bt_ctf_trace bt_trace

which affects both the type name and the variable name. This should not
be a problem in most cases, and it is easy to fix otherwise.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
153 files changed:
bindings/python/bt2/bt2/clock_class.py
bindings/python/bt2/bt2/clock_value.py
bindings/python/bt2/bt2/ctf_writer.py
bindings/python/bt2/bt2/event.py
bindings/python/bt2/bt2/event_class.py
bindings/python/bt2/bt2/field_types.py
bindings/python/bt2/bt2/fields.py
bindings/python/bt2/bt2/native_bt.i
bindings/python/bt2/bt2/native_btccpriomap.i
bindings/python/bt2/bt2/native_btclockclass.i
bindings/python/bt2/bt2/native_btctfwriter.i
bindings/python/bt2/bt2/native_btevent.i
bindings/python/bt2/bt2/native_bteventclass.i
bindings/python/bt2/bt2/native_btfields.i
bindings/python/bt2/bt2/native_btft.i
bindings/python/bt2/bt2/native_btnotification.i
bindings/python/bt2/bt2/native_btpacket.i
bindings/python/bt2/bt2/native_btstream.i
bindings/python/bt2/bt2/native_btstreamclass.i
bindings/python/bt2/bt2/native_bttrace.i
bindings/python/bt2/bt2/packet.py
bindings/python/bt2/bt2/stream.py
bindings/python/bt2/bt2/stream_class.py
bindings/python/bt2/bt2/trace.py
doc/api/README.adoc
doc/api/dox/examples-ctfir.dox
doc/api/dox/group-ctf-ir.dox
include/babeltrace/ctf-ir/attributes-internal.h
include/babeltrace/ctf-ir/clock-class-internal.h
include/babeltrace/ctf-ir/clock-class.h
include/babeltrace/ctf-ir/clock-value-internal.h
include/babeltrace/ctf-ir/clock-value.h
include/babeltrace/ctf-ir/event-class-internal.h
include/babeltrace/ctf-ir/event-class.h
include/babeltrace/ctf-ir/event-internal.h
include/babeltrace/ctf-ir/event.h
include/babeltrace/ctf-ir/field-path-internal.h
include/babeltrace/ctf-ir/field-path.h
include/babeltrace/ctf-ir/field-types-internal.h
include/babeltrace/ctf-ir/field-types.h
include/babeltrace/ctf-ir/fields-internal.h
include/babeltrace/ctf-ir/fields.h
include/babeltrace/ctf-ir/packet-internal.h
include/babeltrace/ctf-ir/packet.h
include/babeltrace/ctf-ir/resolve-internal.h
include/babeltrace/ctf-ir/stream-class-internal.h
include/babeltrace/ctf-ir/stream-class.h
include/babeltrace/ctf-ir/stream-internal.h
include/babeltrace/ctf-ir/stream.h
include/babeltrace/ctf-ir/trace-internal.h
include/babeltrace/ctf-ir/trace.h
include/babeltrace/ctf-ir/utils.h
include/babeltrace/ctf-ir/validation-internal.h
include/babeltrace/ctf-ir/visitor-internal.h
include/babeltrace/ctf-ir/visitor.h
include/babeltrace/ctf-writer/clock-internal.h
include/babeltrace/ctf-writer/event-fields.h
include/babeltrace/ctf-writer/event-types.h
include/babeltrace/ctf-writer/event.h
include/babeltrace/ctf-writer/serialize-internal.h
include/babeltrace/ctf-writer/stream-class.h
include/babeltrace/ctf-writer/stream.h
include/babeltrace/ctf-writer/writer-internal.h
include/babeltrace/ctf-writer/writer.h
include/babeltrace/endian-internal.h
include/babeltrace/graph/clock-class-priority-map-internal.h
include/babeltrace/graph/clock-class-priority-map.h
include/babeltrace/graph/notification-discarded-elements-internal.h
include/babeltrace/graph/notification-discarded-events.h
include/babeltrace/graph/notification-discarded-packets.h
include/babeltrace/graph/notification-event-internal.h
include/babeltrace/graph/notification-event.h
include/babeltrace/graph/notification-inactivity.h
include/babeltrace/graph/notification-internal.h
include/babeltrace/graph/notification-iterator-internal.h
include/babeltrace/graph/notification-packet-internal.h
include/babeltrace/graph/notification-packet.h
include/babeltrace/graph/notification-stream-internal.h
include/babeltrace/graph/notification-stream.h
lib/ctf-ir/attributes.c
lib/ctf-ir/clock-class.c
lib/ctf-ir/event-class.c
lib/ctf-ir/event.c
lib/ctf-ir/field-path.c
lib/ctf-ir/field-types.c
lib/ctf-ir/fields.c
lib/ctf-ir/packet.c
lib/ctf-ir/resolve.c
lib/ctf-ir/stream-class.c
lib/ctf-ir/stream.c
lib/ctf-ir/trace.c
lib/ctf-ir/utils.c
lib/ctf-ir/validation.c
lib/ctf-ir/visitor.c
lib/ctf-writer/clock.c
lib/ctf-writer/serialize.c
lib/ctf-writer/writer.c
lib/graph/clock-class-priority-map.c
lib/graph/iterator.c
lib/graph/notification/discarded-elements.c
lib/graph/notification/discarded-events.c
lib/graph/notification/discarded-packets.c
lib/graph/notification/event.c
lib/graph/notification/inactivity.c
lib/graph/notification/packet.c
lib/graph/notification/stream.c
plugins/ctf/common/btr/btr.c
plugins/ctf/common/btr/btr.h
plugins/ctf/common/metadata/ast.h
plugins/ctf/common/metadata/decoder.c
plugins/ctf/common/metadata/decoder.h
plugins/ctf/common/metadata/visitor-generate-ir.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/ctf/common/notif-iter/notif-iter.h
plugins/ctf/common/utils/utils.c
plugins/ctf/common/utils/utils.h
plugins/ctf/fs-sink/write.c
plugins/ctf/fs-sink/writer.c
plugins/ctf/fs-sink/writer.h
plugins/ctf/fs-src/data-stream-file.c
plugins/ctf/fs-src/data-stream-file.h
plugins/ctf/fs-src/fs.c
plugins/ctf/fs-src/fs.h
plugins/ctf/fs-src/query.c
plugins/ctf/lttng-live/data-stream.c
plugins/ctf/lttng-live/data-stream.h
plugins/ctf/lttng-live/lttng-live-internal.h
plugins/ctf/lttng-live/lttng-live.c
plugins/ctf/lttng-live/metadata.c
plugins/ctf/lttng-live/metadata.h
plugins/ctf/lttng-live/viewer-connection.c
plugins/libctfcopytrace/clock-fields.c
plugins/libctfcopytrace/clock-fields.h
plugins/libctfcopytrace/ctfcopytrace.c
plugins/libctfcopytrace/ctfcopytrace.h
plugins/lttng-utils/copy.c
plugins/lttng-utils/copy.h
plugins/lttng-utils/debug-info.c
plugins/lttng-utils/debug-info.h
plugins/lttng-utils/plugin.c
plugins/text/dmesg/dmesg.c
plugins/text/pretty/print.c
plugins/utils/muxer/muxer.c
plugins/utils/trimmer/copy.c
plugins/utils/trimmer/copy.h
plugins/utils/trimmer/iterator.c
tests/lib/test_bt_ctf_field_type_validation.c
tests/lib/test_bt_notification_iterator.c
tests/lib/test_cc_prio_map.c
tests/lib/test_ctf_ir_ref.c
tests/lib/test_ctf_writer.c
tests/lib/test_ir_visit.c
tests/plugins/test-utils-muxer.c
This page took 0.039774 seconds and 4 git commands to generate.