aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-12-21 15:37:32 -0800
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-01-23 15:57:29 -0500
commitdd3dad0d716dbb9fccadcc8709900d9cac6ca252 (patch)
treecdebce0c3eea35eb5cb490994f9dc43db21695c0 /kernel/trace
parenttrace_uprobe: Display correct offset in uprobe_events (diff)
downloadlinux-dev-dd3dad0d716dbb9fccadcc8709900d9cac6ca252.tar.xz
linux-dev-dd3dad0d716dbb9fccadcc8709900d9cac6ca252.zip
ftrace: Mark function tracer test functions noinline/noclone
The ftrace function tracer self tests calls some functions to verify the get traced. This relies on them not being inlined. Previously this was ensured by putting them into another file, but with LTO the compiler can inline across files, which makes the tests fail. Mark these functions as noinline and noclone. Link: http://lkml.kernel.org/r/20171221233732.31896-1-andi@firstfloor.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_selftest_dynamic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/trace/trace_selftest_dynamic.c b/kernel/trace/trace_selftest_dynamic.c
index 8cda06a10d66..c364cf777e1a 100644
--- a/kernel/trace/trace_selftest_dynamic.c
+++ b/kernel/trace/trace_selftest_dynamic.c
@@ -1,13 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
+#include <linux/compiler.h>
#include "trace.h"
-int DYN_FTRACE_TEST_NAME(void)
+noinline __noclone int DYN_FTRACE_TEST_NAME(void)
{
/* used to call mcount */
return 0;
}
-int DYN_FTRACE_TEST_NAME2(void)
+noinline __noclone int DYN_FTRACE_TEST_NAME2(void)
{
/* used to call mcount */
return 0;