From: Steven Rostedt <rostedt@goodmis.org>
To: Wenji Huang <wenji.huang@oracle.com>
Cc: linux-kernel@vger.kernel.org, fweisbec@gmail.com
Subject: Re: [PATCH] tracing: add checks for printing graph irq
Date: Fri, 11 Dec 2009 10:00:26 -0500 [thread overview]
Message-ID: <1260543626.2146.357.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1260524315-17807-1-git-send-email-wenji.huang@oracle.com>
On Fri, 2009-12-11 at 17:38 +0800, Wenji Huang wrote:
> Check return value of trace_seq_printf.
>
> Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
> ---
> kernel/trace/trace_functions_graph.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index 45e6c01..3fa4055 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -555,8 +555,11 @@ print_graph_irq(struct trace_iterator *iter, unsigned long addr,
> return TRACE_TYPE_PARTIAL_LINE;
>
> /* Don't close the duration column if haven't one */
> - if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
> - trace_seq_printf(s, " |");
> + if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
> + ret = trace_seq_printf(s, " |");
> + if (!ret)
> + return TRACE_TYPE_PARTIAL_LINE;
> + }
> ret = trace_seq_printf(s, "\n");
Actually these checks are no longer needed. I would like to start
removing them. Only the last one is needed.
This is because trace_seq_* now has a "full" attribute. If the s buffer
gets full, it wont write anymore, and all new "trace_seq_*" calls will
return the same.
-- Steve
>
> if (!ret)
prev parent reply other threads:[~2009-12-11 15:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 9:38 Wenji Huang
2009-12-11 11:18 ` Frederic Weisbecker
2009-12-11 11:19 ` Frederic Weisbecker
2009-12-11 15:00 ` Steven Rostedt
2009-12-11 17:44 ` Frederic Weisbecker
2009-12-11 15:00 ` Steven Rostedt [this message]
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=1260543626.2146.357.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wenji.huang@oracle.com \
/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
all inboxes | Powered by JetHome®