From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [RFC][PATCH 04/12] ftrace/x86_32: Push ftrace_ops in as 3rd parameter to function tracer
Date: Tue, 05 Jun 2012 23:51:02 -0400 [thread overview]
Message-ID: <20120606040014.137561542@goodmis.org> (raw)
In-Reply-To: 20120606035058.108720095@goodmis.org
[-- Attachment #1: 0004-ftrace-x86_32-Push-ftrace_ops-in-as-3rd-parameter-to.patch --]
[-- Type: text/plain, Size: 1198 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
Add support of passing the current ftrace_ops into the 3rd parameter
of the callback to the function tracer.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/x86/include/asm/ftrace.h | 3 +--
arch/x86/kernel/entry_32.S | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
index 1fca3c2..aefea5b 100644
--- a/arch/x86/include/asm/ftrace.h
+++ b/arch/x86/include/asm/ftrace.h
@@ -37,9 +37,8 @@
#define MCOUNT_ADDR ((long)(mcount))
#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
-#if defined(CONFIG_DYNAMIC_FTRACE) && defined(CONFIG_X86_64)
+#ifdef CONFIG_DYNAMIC_FTRACE
#define ARCH_SUPPORTS_FTRACE_OPS 1
-#define ARCH_SUPPORTS_FTRACE_SAVE_REGS 1
#endif
#ifndef __ASSEMBLY__
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 01ccf9b..189c93f 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1104,6 +1104,7 @@ ENTRY(ftrace_caller)
pushl %edx
movl 0xc(%esp), %eax
movl 0x4(%ebp), %edx
+ leal function_trace_op, %ecx
subl $MCOUNT_INSN_SIZE, %eax
.globl ftrace_call
--
1.7.10
next prev parent reply other threads:[~2012-06-06 4:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 3:50 [RFC][PATCH 00/12] kprobes/ftrace: Making ftrace usable for kprobes Steven Rostedt
2012-06-06 3:50 ` [RFC][PATCH 01/12] ftrace: Pass ftrace_ops as third parameter to function trace callback Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 02/12] ftrace: Consolidate arch dependent functions with list function Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 03/12] ftrace: Return pt_regs to function trace callback (x86_64 only so far) Steven Rostedt
2012-06-06 3:51 ` Steven Rostedt [this message]
2012-06-06 3:51 ` [RFC][PATCH 05/12] ftrace/x86: Add separate function to save regs Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 06/12] ftrace/x86: Add save_regs for i386 function calls Steven Rostedt
2012-06-06 14:37 ` Steven Rostedt
2012-06-06 15:18 ` Masami Hiramatsu
2012-06-06 3:51 ` [RFC][PATCH 07/12] ftrace: add ftrace_set_filter_ip() for address based filter Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 08/12] kprobes: Inverse taking of module_mutex with kprobe_mutex Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 09/12] kprobes: cleanup to separate probe-able check Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 10/12] kprobes: Move locks into appropriate functions Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 11/12] kprobes: introduce ftrace based optimization Steven Rostedt
2012-06-06 3:51 ` [RFC][PATCH 12/12] kprobes/x86: ftrace based optimization for x86 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=20120606040014.137561542@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
/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