From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Shaohua Li <shaohua.li@intel.com>,
ia64 <linux-ia64@vger.kernel.org>,
Tony Luck <tony.luck@intel.com>, Sam Ravnborg <sam@ravnborg.org>,
u.kleine-koenig@pengutronix.de,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 2/9] ftrace, ia64: explictly ignore a file in recordmcount.pl
Date: Tue, 13 Jan 2009 01:11:12 -0500 [thread overview]
Message-ID: <20090113061147.356999436@goodmis.org> (raw)
In-Reply-To: 20090113061110.856268617@goodmis.org
[-- Attachment #1: 0002-ftrace-ia64-explictly-ignore-a-file-in-recordmcoun.patch --]
[-- Type: text/plain, Size: 1917 bytes --]
From: Shaohua Li <shaohua.li@intel.com>
In IA64, a function pointer isn't a 'unsigned long' but a
'struct {unsigned long ip, unsigned long gp}'. MCOUNT_ADDR is determined
at link time not compile time, so explictly ignore kernel/trace/ftrace.o
in recordmcount.pl.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/ftrace.c | 10 +---------
scripts/recordmcount.pl | 5 +++++
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 9e54a6c..76bb884 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -263,14 +263,6 @@ static void ftrace_update_pid_func(void)
# error Dynamic ftrace depends on MCOUNT_RECORD
#endif
-/*
- * Since MCOUNT_ADDR may point to mcount itself, we do not want
- * to get it confused by reading a reference in the code as we
- * are parsing on objcopy output of text. Use a variable for
- * it instead.
- */
-static unsigned long mcount_addr = MCOUNT_ADDR;
-
enum {
FTRACE_ENABLE_CALLS = (1 << 0),
FTRACE_DISABLE_CALLS = (1 << 1),
@@ -575,7 +567,7 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
ip = rec->ip;
- ret = ftrace_make_nop(mod, rec, mcount_addr);
+ ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
if (ret) {
ftrace_bug(ret, ip);
rec->flags |= FTRACE_FL_FAILED;
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 282485a..070042b 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -109,6 +109,11 @@ if ($#ARGV < 7) {
my ($arch, $bits, $objdump, $objcopy, $cc,
$ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
+# This file refers to mcount and shouldn't be ftraced, so lets' ignore it
+if ($inputfile eq "kernel/trace/ftrace.o") {
+ exit(0);
+}
+
# Acceptable sections to record.
my %text_sections = (
".text" => 1,
--
1.5.6.5
--
next prev parent reply other threads:[~2009-01-13 6:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 6:11 [PATCH 0/9] ftrace: updates for tip Steven Rostedt
2009-01-13 6:11 ` [PATCH 1/9] ftrace, ia64: make recordmcount destinct module compile Steven Rostedt
2009-01-13 6:11 ` Steven Rostedt [this message]
2009-01-13 6:11 ` [PATCH 3/9] ftrace, ia64: Add macro for ftrace_caller Steven Rostedt
2009-01-13 6:11 ` [PATCH 4/9] ftrace, ia64: Add recordmcount for ia64 Steven Rostedt
2009-01-13 6:11 ` [PATCH 5/9] ftrace, ia64: IA64 static ftrace support Steven Rostedt
2009-01-13 6:11 ` [PATCH 6/9] ftrace, ia64: IA64 dynamic " Steven Rostedt
2009-01-13 6:11 ` [PATCH 7/9] tracing/ftrace: separate events tracing and stats tracing engine Steven Rostedt
2009-01-13 6:11 ` [PATCH 8/9] tracing: add a new workqueue tracer Steven Rostedt
2009-01-13 6:11 ` [PATCH 9/9] ftrace, trivial: fix typo "resgister" -> "register" Steven Rostedt
2009-01-13 8:03 ` Uwe Kleine-König
2009-01-13 13:04 ` Steven Rostedt
2009-01-13 14:06 ` [PATCH 0/9] ftrace: updates for tip Steven Rostedt
2009-01-13 16:54 ` Steven Rostedt
2009-01-14 11:12 ` 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=20090113061147.356999436@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
--cc=shaohua.li@intel.com \
--cc=srostedt@redhat.com \
--cc=tony.luck@intel.com \
--cc=u.kleine-koenig@pengutronix.de \
/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