* [PATCH] libtracefs: Add missed_events to record
@ 2022-08-04 11:05 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2022-08-04 11:05 UTC (permalink / raw)
To: Linux Trace Devel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-04 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 11:05 [PATCH] libtracefs: Add missed_events to record Steven Rostedt
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).