From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] libtracefs: Add missed_events to record
Date: Thu, 4 Aug 2022 07:05:59 -0400 [thread overview]
Message-ID: <20220804070559.36e6e6fc@gandalf.local.home> (raw)
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
When iterating over the events in the ring buffer, make sure to set the
"missed_events" value of the record. This is very important for the
callers to know that events were dropped.
Fixes: 3add2d75192e0 ("libtracefs: Iterate over raw events in sorted order")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
src/tracefs-events.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tracefs-events.c b/src/tracefs-events.c
index 61a1c122e74e..d870241e127f 100644
--- a/src/tracefs-events.c
+++ b/src/tracefs-events.c
@@ -46,6 +46,7 @@ static int read_kbuf_record(struct cpu_iterate *cpu)
cpu->record.ts = ts;
cpu->record.size = kbuffer_event_size(cpu->kbuf);
cpu->record.record_size = kbuffer_curr_size(cpu->kbuf);
+ cpu->record.missed_events = kbuffer_missed_events(cpu->kbuf);
cpu->record.cpu = cpu->cpu;
cpu->record.data = ptr;
cpu->record.ref_count = 1;
--
2.35.1
reply other threads:[~2022-08-04 11:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220804070559.36e6e6fc@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).