[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090728153454.GB6215@nowhere>
Date: Tue, 28 Jul 2009 17:34:55 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing: fix missing function_graph events when we
splice_read from trace_pipe
On Tue, Jul 28, 2009 at 08:17:22PM +0800, Lai Jiangshan wrote:
>
> About a half events are missing when we splice_read
> from trace_pipe. They are consumed unexpected.
>
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> ---
Also queued for .31
Thanks!
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index e30e6b1..41996fc 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -3085,7 +3085,8 @@ tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter)
> break;
> }
>
> - trace_consume(iter);
> + if (ret != TRACE_TYPE_NO_CONSUME)
> + trace_consume(iter);
> rem -= count;
> if (!find_next_entry_inc(iter)) {
> rem = 0;
> @@ -4230,8 +4231,11 @@ static void __ftrace_dump(bool disable_tracing)
> iter.pos = -1;
>
> if (find_next_entry_inc(&iter) != NULL) {
> - print_trace_line(&iter);
> - trace_consume(&iter);
> + int ret;
> +
> + ret = print_trace_line(&iter);
> + if (ret != TRACE_TYPE_NO_CONSUME)
> + trace_consume(&iter);
> }
>
> trace_printk_seq(&iter.seq);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists