From: Steven Rostedt <rostedt@goodmis.org>
To: Rabin Vincent <rabin@rab.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: function_graph selftest fails with !DYNAMIC
Date: Fri, 04 Nov 2011 09:44:29 -0400 [thread overview]
Message-ID: <1320414269.19219.12.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20111102150255.GA6973@debian>
On Wed, 2011-11-02 at 20:32 +0530, Rabin Vincent wrote:
> The function_graph selftest fails when CONFIG_DYNAMIC_FTRACE is not set
> (tested on x86-64) on current kernels:
>
> [ 0.300124] Testing tracer function: PASSED
> [ 0.446092] Testing tracer function_graph: .. no entries found ..FAILED!
>
> Bisecting goes back to this commit:
>
> 2b499381bc50ede01b3d8eab164ca2fad00655f0 is the first bad commit
Your bisect is wrong. I ran it though ktest.pl and it gave me this
bisect commit:
commit 6331c28c962561aee59e5a493b7556a4bb585957
Author: Steven Rostedt <srostedt@redhat.com>
Date: Wed Jul 13 15:11:02 2011 -0400
ftrace: Fix dynamic selftest failure on some archs
I used the following test config options:
TEST_START IF ${RUN_TYPE} == bisect
TEST_TYPE = bisect
BISECT_GOOD = 2b499381bc50ede01b3d8eab164ca2fad00655f0
BISECT_BAD = b4beb4bf9934d151bf4581a54ae028927374cb2a
BISECT_TYPE = test
TEST = ssh root@bxf /work/bin/test-fgraph
BISECT_CHECK = good
MIN_CONFIG = ${THIS_DIR}/config-bisect
BUILD_NOCLEAN = 1
Where test-fgraph was a simple script:
if dmesg | grep function_graph | grep PASSED; then
exit 0
else
exit 1
fi
Looking at this commit I found the bug, and yes I'm quite embarrassed by
it. It happened because I left in a change to test the
!CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST case.
+#undef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
#ifndef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
The fact that function graph tracing failed when this was unset was not
a bug in the logic in this case, but because the mcount code in the x86
asm assumes that this is set and will do different things because of the
way the code changes.
The simple fix is:
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -151,7 +151,6 @@ void clear_ftrace_function(void)
ftrace_pid_function = ftrace_stub;
}
-#undef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
#ifndef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
/*
* For those archs that do not test ftrace_trace_stop in their
I'll write a formal patch and send it up.
Thanks for reporting!
-- Steve
next prev parent reply other threads:[~2011-11-04 13:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 15:02 Rabin Vincent
2011-11-03 0:17 ` Steven Rostedt
2011-11-03 16:08 ` Steven Rostedt
2011-11-04 13:44 ` Steven Rostedt [this message]
2011-11-11 16:55 ` Rabin Vincent
2011-11-12 0:20 ` Steven Rostedt
2011-11-18 23:12 ` [tip:perf/core] ftrace: Remove force undef config value left for testing tip-bot for Steven Rostedt
2011-12-06 6:26 ` tip-bot for Steven Rostedt
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=1320414269.19219.12.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rabin@rab.in \
/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®