* [PATCH] trace-cmd: Make read nonblocking in find_time_stamp().
@ 2013-11-05 0:51 Aaron Fabbri
2015-02-09 22:51 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Fabbri @ 2013-11-05 0:51 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-rt-users, Linux Kernel Mailing List, yoshihiro.yunomae.ez
This only affects the tsc -> time of day correlation when doing
`trace-cmd record --date`.
get_date_to_ts() writes a dummy event to trace_marker and then reads it back.
Reading it back is done by looping over all per-cpu raw trace pipes and trying
to read. This read should be non-blocking, because the dummy event can end up
on any CPU.
Signed-off-by: Aaron Fabbri <ajfabbri@gmail.com>
---
trace-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trace-record.c b/trace-record.c
index 1b1d293..dca8a92 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -2092,7 +2092,7 @@ static unsigned long long find_time_stamp(struct
pevent *pevent)
continue;
sprintf(file, "%s/%s/trace_pipe_raw", path, name);
- fd = open(file, O_RDONLY);
+ fd = open(file, O_RDONLY | O_NONBLOCK);
if (fd < 0)
continue;
do {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] trace-cmd: Make read nonblocking in find_time_stamp().
2013-11-05 0:51 [PATCH] trace-cmd: Make read nonblocking in find_time_stamp() Aaron Fabbri
@ 2015-02-09 22:51 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2015-02-09 22:51 UTC (permalink / raw)
To: Aaron Fabbri
Cc: linux-rt-users, Linux Kernel Mailing List, yoshihiro.yunomae.ez
On Mon, 4 Nov 2013 16:51:48 -0800
Aaron Fabbri <ajfabbri@gmail.com> wrote:
> This only affects the tsc -> time of day correlation when doing
> `trace-cmd record --date`.
>
> get_date_to_ts() writes a dummy event to trace_marker and then reads it back.
> Reading it back is done by looping over all per-cpu raw trace pipes and trying
> to read. This read should be non-blocking, because the dummy event can end up
> on any CPU.
>
> Signed-off-by: Aaron Fabbri <ajfabbri@gmail.com>
Hmm, I somehow missed this patch. I just applied (way late :-/), and
I'm placing it in the stable releases. I'm starting my testing now.
-- Steve
> ---
> trace-record.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/trace-record.c b/trace-record.c
> index 1b1d293..dca8a92 100644
> --- a/trace-record.c
> +++ b/trace-record.c
> @@ -2092,7 +2092,7 @@ static unsigned long long find_time_stamp(struct
> pevent *pevent)
> continue;
>
> sprintf(file, "%s/%s/trace_pipe_raw", path, name);
> - fd = open(file, O_RDONLY);
> + fd = open(file, O_RDONLY | O_NONBLOCK);
> if (fd < 0)
> continue;
> do {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-09 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 0:51 [PATCH] trace-cmd: Make read nonblocking in find_time_stamp() Aaron Fabbri
2015-02-09 22:51 ` 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).