Skip to contentSkip to conversation

ftrace/x86: Add comment on static function tracing

PATCH In review Namhyung Kim 3 participants 3 messages Nov 17, 2015 – Nov 19, 2015 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftrace/x86: Add comment on static function tracing

There was a confusion between update_ftrace_function() and static function tracing trampoline regarding 3rd parameter (ftrace_ops). Add a comment for clarification.

---
 arch/x86/kernel/mcount_64.S | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kernel/mcount_64.S +6 -0
index 94ea120fa21f..87e1762e2bca 100644
@@ -278,6 +278,12 @@ GLOBAL(ftrace_stub)
 	/* save_mcount_regs fills in first two parameters */
 	save_mcount_regs
 
+	/*
+	 * When DYNAMIC_FTRACE is not defined, ARCH_SUPPORTS_FTRACE_OPS is not
+	 * set (see include/asm/ftrace.h and include/linux/ftrace.h).  Only the
+	 * ip and parent ip are used and the list function is called when
+	 * function tracing is enabled.
+	 */
 	call   *ftrace_trace_function
 
 	restore_mcount_regs
Signature · 1 line
2.6.2
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Tue, 17 Nov 2015 09:43:24 +0900 Namhyung Kim <[email protected]> wrote:

There was a confusion between update_ftrace_function() and static function tracing trampoline regarding 3rd parameter (ftrace_ops). Add a comment for clarification.

-- Steve

Quoted 22 lines
---
 arch/x86/kernel/mcount_64.S | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kernel/mcount_64.S +6 -0
index 94ea120fa21f..87e1762e2bca 100644
@@ -278,6 +278,12 @@ GLOBAL(ftrace_stub)
 	/* save_mcount_regs fills in first two parameters */
 	save_mcount_regs
 
+	/*
+	 * When DYNAMIC_FTRACE is not defined, ARCH_SUPPORTS_FTRACE_OPS is not
+	 * set (see include/asm/ftrace.h and include/linux/ftrace.h).  Only the
+	 * ip and parent ip are used and the list function is called when
+	 * function tracing is enabled.
+	 */
 	call   *ftrace_trace_function
 
 	restore_mcount_regs
#2 lore raw

[tip:x86/urgent] x86/ftrace: Add comment on static function tracing

In reply to Namhyung Kim
x86/ftrace: Add comment on static function tracing
Commit-ID:  112677d683d31ebd6a8e8b02e0620ae512354b2d
Gitweb:     http://git.kernel.org/tip/112677d683d31ebd6a8e8b02e0620ae512354b2d
Author:     Namhyung Kim <[email protected]>
AuthorDate: Tue, 17 Nov 2015 09:43:24 +0900
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 19 Nov 2015 11:07:49 +0100

x86/ftrace: Add comment on static function tracing

There was a confusion between update_ftrace_function() and static function tracing trampoline regarding 3rd parameter (ftrace_ops). Add a comment for clarification.

---
 arch/x86/kernel/mcount_64.S | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kernel/mcount_64.S +6 -0
index 94ea120..87e1762 100644
@@ -278,6 +278,12 @@ trace:
 	/* save_mcount_regs fills in first two parameters */
 	save_mcount_regs
 
+	/*
+	 * When DYNAMIC_FTRACE is not defined, ARCH_SUPPORTS_FTRACE_OPS is not
+	 * set (see include/asm/ftrace.h and include/linux/ftrace.h).  Only the
+	 * ip and parent ip are used and the list function is called when
+	 * function tracing is enabled.
+	 */
 	call   *ftrace_trace_function
 
 	restore_mcount_regs