public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: fix missing function_graph events when we splice_read from trace_pipe
Date: Tue, 28 Jul 2009 17:34:55 +0200	[thread overview]
Message-ID: <20090728153454.GB6215@nowhere> (raw)
In-Reply-To: <4A6EEC52.90704@cn.fujitsu.com>

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@cn.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);
> 
> 


  reply	other threads:[~2009-07-28 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 12:17 [PATCH] tracing: fix missing function_graph events when we splice_read from trace_pipe Lai Jiangshan
2009-07-28 15:34 ` Frederic Weisbecker [this message]
2009-08-04 12:12 ` [tip:tracing/urgent] tracing: Fix " tip-bot for Lai Jiangshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090728153454.GB6215@nowhere \
    --to=fweisbec@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox