From: Steven Rostedt <rostedt@goodmis.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH] tracing: Fix the outmost stupidity of tracing_off()
Date: Fri, 15 Jun 2012 07:54:21 -0400 [thread overview]
Message-ID: <1339761261.13377.353.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1339733919.13377.328.camel@gandalf.stny.rr.com>
On Fri, 2012-06-15 at 00:18 -0400, Steven Rostedt wrote:
> For testing something like this, I would have
> added tracing_off() in the code, and I do reset --hard to remove my
> testing code. If I made the fix and forgot to --amend it, the fix was
> lost.
I'm almost positive this is what happened.
tracing_off() is similar to trace_printk(), it's something that is
usually added during development and not something that is normally
executed in production. With an unmodified kernel, to test it, you need
to start tracing and trigger a crash and have ftrace_dump_on_opps set,
and have something to read it so that you know the tracing stopped. Not
very reliable, and not something to put into generic testing.
I forgot that the function tracer 'traceoff' trigger uses it, otherwise
I would have added that new test a while ago.
For my testing, I put in tracing_off() at various places in the kernel,
and made sure that it worked. I did see that it was broken before and
fixed it. But for some reason, maybe I was distracted by other work, I
never did the git commit --amend (similar to forgetting to do a quilt
refresh). All my tests worked, and I reverted the test code I added with
either a 'git reset --hard', or a 'git diff | patch -p1 -R', both of
which would have removed my fix.
I usually scan the 'git diff' before doing the revert, but as this
change was a one liner, it could easily have been missed.
The code I've been working on for the last few months was debugging the
breakpoint code, which, when it failed, triple faulted the box. Tracing
was never an option. Which means that I would not have played with
tracing_off() then. And the older code that I've been working with
(3.2-rt), did not have this bug.
Again, I know you are one of the biggest users of ftrace, and I'm very
sorry (and ashamed) that his bug got in and caused you a days worth of
frustration.
-- Steve
prev parent reply other threads:[~2012-06-15 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 22:47 Thomas Gleixner
2012-06-14 22:50 ` Thomas Gleixner
2012-06-14 23:38 ` Steven Rostedt
2012-06-14 22:58 ` Steven Rostedt
2012-06-14 23:12 ` Thomas Gleixner
2012-06-14 23:48 ` Steven Rostedt
2012-06-15 0:00 ` Thomas Gleixner
2012-06-15 0:32 ` Steven Rostedt
2012-06-15 4:18 ` Steven Rostedt
2012-06-15 11:54 ` 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=1339761261.13377.353.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--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 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®