From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 1/2] ftrace: binary and not logical for continue test
Date: Wed, 03 Sep 2008 17:42:50 -0400 [thread overview]
Message-ID: <20080903214754.130440561@goodmis.org> (raw)
In-Reply-To: 20080903214249.661170580@goodmis.org
[-- Attachment #1: ftrace-printk-and-fix.patch --]
[-- Type: text/plain, Size: 1636 bytes --]
Peter Zijlstra provided me with a nice brown paper bag while letting me know
that I was doing a logical AND and not a binary one, making a condition
true more often than it should be.
Luckily, a false true is handled by the calling function and no harm is
done. But this needs to be fixed regardless.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-tip.git/kernel/trace/trace.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace.c 2008-09-03 16:46:28.000000000 -0400
+++ linux-tip.git/kernel/trace/trace.c 2008-09-03 16:46:30.000000000 -0400
@@ -1655,7 +1655,7 @@ print_lat_fmt(struct trace_iterator *ite
case TRACE_PRINT:
seq_print_ip_sym(s, field->print.ip, sym_flags);
trace_seq_printf(s, ": %s", field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
default:
@@ -1768,7 +1768,7 @@ static int print_trace_fmt(struct trace_
case TRACE_PRINT:
seq_print_ip_sym(s, field->print.ip, sym_flags);
trace_seq_printf(s, ": %s", field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
}
@@ -1833,7 +1833,7 @@ static int print_raw_fmt(struct trace_it
case TRACE_PRINT:
trace_seq_printf(s, "# %lx %s",
field->print.ip, field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
}
--
next prev parent reply other threads:[~2008-09-03 21:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 21:42 [PATCH 0/2] ftrace: ftrace_printk fixes Steven Rostedt
2008-09-03 21:42 ` Steven Rostedt [this message]
2008-09-03 21:42 ` [PATCH 2/2] ftrace: print continue index fix Steven Rostedt
2008-09-04 7:41 ` [PATCH 0/2] ftrace: ftrace_printk fixes Peter Zijlstra
2008-09-04 8:24 ` [PATCH] ftrace: make ftrace_printk usable with the other tracers Peter Zijlstra
2008-09-04 8:24 ` [PATCH] ftrace: sched_switch: show the wakee's cpu Peter Zijlstra
2008-09-04 10:16 ` Ingo Molnar
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=20080903214754.130440561@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.