[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191217174732.08df7689@gandalf.local.home>
Date: Tue, 17 Dec 2019 17:47:32 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: David Laight <David.Laight@...LAB.COM>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: Re: ftrace trace_raw_pipe format
On Tue, 17 Dec 2019 17:34:03 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> static void read_raw_buffer(int i, const char *buffer)
> {
> struct trace_seq s;
> char buf[page_size];
> int fd;
> int r;
>
> printf("Parsing CPU %d buffer\n", i);
>
> fd = open(buffer, O_RDONLY);
Changing the above to:
fd = open(buffer, O_RDONLY|O_NONBLOCK);
Will then not make it block on empty buffers.
-- Steve
> if (fd < 0)
> pdie("Failed to open %s", buffer);
Powered by blists - more mailing lists