From ccad54e5351b8ce34e73875deebc5a8f215b49d3 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 13 Aug 2019 18:51:32 -0400 Subject: [PATCH] Use uuid as first comparison criteria 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 Change-Id: I39f3c513e27bffd51ca02b089c097ac406e3316e Reviewed-on: https://review.lttng.org/c/babeltrace/+/1914 CI-Build: Philippe Proulx Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/plugins/common/muxing/muxing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/common/muxing/muxing.c b/src/plugins/common/muxing/muxing.c index 15e9427d..6257a28a 100644 --- a/src/plugins/common/muxing/muxing.c +++ b/src/plugins/common/muxing/muxing.c @@ -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; } -- 2.34.1