[lttng-dev] Missing discarded events message in live-reading mode

liguang li liguang.lee6 at gmail.com
Wed Sep 20 09:37:30 UTC 2017


Hi,

Babeltrace in live mode is not displaying the discarded events message. But
on CTF traces the discarded events message will be printed on stderr.

Why? Is there any restriction?

I added the following patch into the ctf_live_packet_seek() function, and
found
it works well. Is there any side effect?

diff --git a/formats/lttng-live/lttng-live-comm.c
b/formats/lttng-live/lttng-live-comm.c
index a1c95bb..dc14bf5 100644
--- a/formats/lttng-live/lttng-live-comm.c
+++ b/formats/lttng-live/lttng-live-comm.c
@@ -1297,6 +1297,11 @@ retry:
                ctf_update_current_packet_index(&file_stream->parent,
                                prev_index, cur_index);

+               if
((&file_stream->parent)->stream_class->trace->parent.collection) {
+                       ctf_print_discarded_lost(stderr,
&file_stream->parent);
+               }
+
+
                file_stream->parent.cycles_timestamp =
                                cur_index->ts_cycles.timestamp_begin;
                file_stream->parent.real_timestamp =
...


Regards,
Liguang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20170920/3bead9a2/attachment.html>


More information about the lttng-dev mailing list