Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: liguang.lee6@gmail.com (liguang li)
Subject: [lttng-dev] Missing discarded events message in live-reading mode
Date: Wed, 20 Sep 2017 17:37:30 +0800	[thread overview]
Message-ID: <CAMYaK0RsEf4NaEV5ATXDyVoWq4sWQ5uLu4eWW0nVOzn43VwWGw@mail.gmail.com> (raw)

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>


             reply	other threads:[~2017-09-20  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  9:37 liguang li [this message]
2017-09-28 14:04 ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMYaK0RsEf4NaEV5ATXDyVoWq4sWQ5uLu4eWW0nVOzn43VwWGw@mail.gmail.com \
    --to=liguang.lee6@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox