From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> Looking at https://bugzilla.kernel.org/show_bug.cgi?id=216577 and analyzing the fix, I found a bunch of other issues with trace-cmd stream. This series is to address them. Steven Rostedt (Google) (10): trace-cmd library: Set recorder to nonblock when finished trace-cmd stream: Do not block when stopping threads trace-cmd stream: Add a flush signal to kick the output trace-cmd stream: Do one last flush when finished trace-cmd library: Fix read_data() with error from tracefs_cpu_read() trace-cmd: Have trace_stream_read() use poll() trace-cmd stream: Set default sleep time to half a second trace-cmd library: Return the result of tracefs_cpu_stop() trace-cmd record: Set sleep_time to zero at end of recording trace-cmd record: Keep stopping the recording when finished .../include/private/trace-cmd-private.h | 4 +- lib/trace-cmd/trace-recorder.c | 33 ++++++--- tracecmd/include/trace-local.h | 2 +- tracecmd/trace-record.c | 72 +++++++++++++++---- tracecmd/trace-stream.c | 34 ++++----- 5 files changed, 99 insertions(+), 46 deletions(-) -- 2.35.1