From: Abhishek Sagar <sagar.abhishek@gmail.com>
To: rostedt@goodmis.org
Cc: davem@davemloft.net, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] ftrace: remove ftrace_ip_converted
Date: Sun, 01 Jun 2008 21:47:42 +0530 [thread overview]
Message-ID: <4842CBA6.6040208@gmail.com> (raw)
Remove the unneeded function ftrace_ip_converted().
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
---
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index f4cb4cc..22f3d6e 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -22,16 +22,6 @@
static unsigned long bl_insn;
static const unsigned long NOP = 0xe1a00000; /* mov r0, r0 */
-/* return true if mcount call site is already patched/no-op'ed */
-int ftrace_ip_converted(unsigned long pc)
-{
- unsigned long save;
-
- pc -= INSN_SIZE;
- save = *(unsigned long *)pc;
- return save == NOP;
-}
-
unsigned char *ftrace_nop_replace(void)
{
return (char *)&NOP;
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 69ed412..e12c593 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -27,16 +27,6 @@ static unsigned int ftrace_nop = 0x60000000;
# define GET_ADDR(addr) *(unsigned long *)addr
#endif
-notrace int ftrace_ip_converted(unsigned long ip)
-{
- unsigned int save;
-
- ip -= CALL_BACK;
- save = *(unsigned int *)ip;
-
- return save == ftrace_nop;
-}
-
static unsigned int notrace ftrace_calc_offset(long ip, long addr)
{
return (int)((addr + CALL_BACK) - ip);
diff --git a/arch/sparc64/kernel/ftrace.c b/arch/sparc64/kernel/ftrace.c
index f449e6d..c173731 100644
--- a/arch/sparc64/kernel/ftrace.c
+++ b/arch/sparc64/kernel/ftrace.c
@@ -7,13 +7,6 @@
static const u32 ftrace_nop = 0x01000000;
-notrace int ftrace_ip_converted(unsigned long ip)
-{
- u32 insn = *(u32 *) ip;
-
- return (insn == ftrace_nop);
-}
-
notrace unsigned char *ftrace_nop_replace(void)
{
return (char *)&ftrace_nop;
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 498608c..bc5cf8d 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -31,16 +31,6 @@ union ftrace_code_union {
} __attribute__((packed));
};
-notrace int ftrace_ip_converted(unsigned long ip)
-{
- unsigned long save;
-
- ip -= CALL_BACK;
- save = *(long *)ip;
-
- return save == *ftrace_nop;
-}
-
static int notrace ftrace_calc_offset(long ip, long addr)
{
return (int)(addr - ip);
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 33cee36..2b287ea 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -307,13 +307,6 @@ ftrace_record_ip(unsigned long ip)
if (ftrace_ip_in_hash(ip, key))
goto out_unlock;
- /*
- * There's a slight race that the ftraced will update the
- * hash and reset here. If it is already converted, skip it.
- */
- if (ftrace_ip_converted(ip))
- goto out_unlock;
-
node = ftrace_alloc_dyn_node(ip);
if (!node)
goto out_unlock;
next reply other threads:[~2008-06-01 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 16:17 Abhishek Sagar [this message]
2008-06-10 9:58 ` [PATCH 2/3] ftrace: remove ftrace_ip_converted 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=4842CBA6.6040208@gmail.com \
--to=sagar.abhishek@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.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