* [PATCH] trace-cmd: fix --poll trace recording
@ 2024-01-29 20:42 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2024-01-29 20:42 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-trace-devel
When using --poll, move_data() returns -1 and errno is set to EAGAIN.
This causes the record threads to stop recording.
Fix it by returning to the read loop in case EAGAIN, if --poll
is specified.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c
index 70ce52e..0633edf 100644
--- a/lib/trace-cmd/trace-recorder.c
+++ b/lib/trace-cmd/trace-recorder.c
@@ -421,6 +421,9 @@ int tracecmd_start_recording(struct tracecmd_recorder *recorder, unsigned long s
if (ret < 0) {
if (errno == EINTR)
continue;
+ if ((recorder->flags & TRACECMD_RECORD_POLL) &&
+ errno == EAGAIN)
+ continue;
return ret;
}
read += ret;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-29 20:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 20:42 [PATCH] trace-cmd: fix --poll trace recording Marcelo Tosatti
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).