Use uuid as first comparison criteria
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 13 Aug 2019 22:51:32 +0000 (18:51 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 14 Aug 2019 22:00:14 +0000 (18:00 -0400)
This is most important in the message ordering reproducibility against
multiple sources where some might populate the trace name and some don't.

A good example of a source not populating the trace name is lttng-live.

It facilitates the testing of lttng-live source plugin since it is
possible to compare it to the src.ctf.fs plugin directly.

Philippe adds: there's a trace UUID property in a CTF metadata stream,
but no trace name property. The trace name is entirely up to the
specific CTF source component class. Therefore it's safer to use the
UUID to distinguish unique traces.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I39f3c513e27bffd51ca02b089c097ac406e3316e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1914
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/common/muxing/muxing.c

index 15e9427d6c17e2c73046f8b7e6a86f74362ef9f4..6257a28ad49e72fb4fa39e662713963f6d2aeff8 100644 (file)
@@ -856,14 +856,14 @@ int common_muxing_compare_messages(const bt_message *left_msg,
        msgs.right.trace = borrow_trace(right_msg);
        msgs.right.stream = borrow_stream(right_msg);
 
-       /* Same timestamp: compare trace names. */
-       ret = compare_messages_by_trace_name(&msgs);
+       /* Same timestamp: compare trace UUIDs. */
+       ret = compare_messages_by_trace_uuid(&msgs);
        if (ret) {
                goto end;
        }
 
-       /* Same timestamp and trace name: compare trace UUIDs. */
-       ret = compare_messages_by_trace_uuid(&msgs);
+       /* Same timestamp and trace UUID: compare trace names. */
+       ret = compare_messages_by_trace_name(&msgs);
        if (ret) {
                goto end;
        }
This page took 0.025012 seconds and 4 git commands to generate.