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 3/9] ftrace, ia64: Add macro for ftrace_caller
Date: Tue, 13 Jan 2009 01:11:13 -0500 [thread overview]
Message-ID: <20090113061147.545128781@goodmis.org> (raw)
In-Reply-To: 20090113061110.856268617@goodmis.org
[-- Attachment #1: 0003-ftrace-ia64-Add-macro-for-ftrace_caller.patch --]
[-- Type: text/plain, Size: 1337 bytes --]
From: Shaohua Li <shaohua.li@intel.com>
Define FTRACE_ADDR. In IA64, a function pointer isn't a 'unsigned long' but a
'struct {unsigned long ip, unsigned long gp}'.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
include/linux/ftrace.h | 4 ++++
kernel/trace/ftrace.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 677432b..0547214 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -126,6 +126,10 @@ extern int ftrace_update_ftrace_func(ftrace_func_t func);
extern void ftrace_caller(void);
extern void ftrace_call(void);
extern void mcount_call(void);
+
+#ifndef FTRACE_ADDR
+#define FTRACE_ADDR ((unsigned long)ftrace_caller)
+#endif
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
extern void ftrace_graph_caller(void);
extern int ftrace_enable_ftrace_graph_caller(void);
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 76bb884..9f53610 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -455,7 +455,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
unsigned long ip, fl;
unsigned long ftrace_addr;
- ftrace_addr = (unsigned long)ftrace_caller;
+ ftrace_addr = (unsigned long)FTRACE_ADDR;
ip = rec->ip;
--
1.5.6.5
--
next prev parent reply other threads:[~2009-01-13 6:13 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 ` [PATCH 2/9] ftrace, ia64: explictly ignore a file in recordmcount.pl Steven Rostedt
2009-01-13 6:11 ` Steven Rostedt [this message]
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.545128781@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