aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-06-25 13:26:59 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-07-18 13:57:01 -0400
commit7544256aa20356e506b0d179f9b6abc661847e2f (patch)
treeb626f07aff5928a44c1304f2f6e6f99e9a10a9c5
parent1d48d5960f9f24b8afd5b1dbb10bfe17b5f29a35 (diff)
ftrace: Remove check for HAVE_FUNCTION_TRACE_MCOUNT_TEST
function_trace_stop is no longer used to disable function tracing. This means that archs are no longer limited if it does not support checking this variable in the mcount trampoline. No need to use the list_func for archs that do not support this obsolete method. Acked-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Documentation/trace/ftrace-design.txt26
-rw-r--r--include/linux/ftrace.h3
2 files changed, 1 insertions, 28 deletions
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index 3f669b9e8852..dd5f916b351d 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -102,30 +102,6 @@ extern void mcount(void);
102EXPORT_SYMBOL(mcount); 102EXPORT_SYMBOL(mcount);
103 103
104 104
105HAVE_FUNCTION_TRACE_MCOUNT_TEST
106-------------------------------
107
108This is an optional optimization for the normal case when tracing is turned off
109in the system. If you do not enable this Kconfig option, the common ftrace
110code will take care of doing the checking for you.
111
112To support this feature, you only need to check the function_trace_stop
113variable in the mcount function. If it is non-zero, there is no tracing to be
114done at all, so you can return.
115
116This additional pseudo code would simply be:
117void mcount(void)
118{
119 /* save any bare state needed in order to do initial checking */
120
121+ if (function_trace_stop)
122+ return;
123
124 extern void (*ftrace_trace_function)(unsigned long, unsigned long);
125 if (ftrace_trace_function != ftrace_stub)
126...
127
128
129HAVE_FUNCTION_GRAPH_TRACER 105HAVE_FUNCTION_GRAPH_TRACER
130-------------------------- 106--------------------------
131 107
@@ -328,8 +304,6 @@ void mcount(void)
328 304
329void ftrace_caller(void) 305void ftrace_caller(void)
330{ 306{
331 /* implement HAVE_FUNCTION_TRACE_MCOUNT_TEST if you desire */
332
333 /* save all state needed by the ABI (see paragraph above) */ 307 /* save all state needed by the ABI (see paragraph above) */
334 308
335 unsigned long frompc = ...; 309 unsigned long frompc = ...;
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index b7333794554f..c800906235e1 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -33,8 +33,7 @@
33 * features, then it must call an indirect function that 33 * features, then it must call an indirect function that
34 * does. Or at least does enough to prevent any unwelcomed side effects. 34 * does. Or at least does enough to prevent any unwelcomed side effects.
35 */ 35 */
36#if !defined(CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST) || \ 36#if !ARCH_SUPPORTS_FTRACE_OPS
37 !ARCH_SUPPORTS_FTRACE_OPS
38# define FTRACE_FORCE_LIST_FUNC 1 37# define FTRACE_FORCE_LIST_FUNC 1
39#else 38#else
40# define FTRACE_FORCE_LIST_FUNC 0 39# define FTRACE_FORCE_LIST_FUNC 0