summaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-03-03 16:15:39 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-03-24 20:51:49 -0400
commit42c269c88dc146982a54a8267f71abc99f12852a (patch)
tree2fecaaec16fe65febc290be5d67b396d0d0f75e3 /include/linux/init.h
parentdbeafd0d6131d0f6ae8cd7551f5f4bf8c54aa49a (diff)
downloadlinux-42c269c88dc146982a54a8267f71abc99f12852a.tar.gz
linux-42c269c88dc146982a54a8267f71abc99f12852a.tar.bz2
linux-42c269c88dc146982a54a8267f71abc99f12852a.zip
ftrace: Allow for function tracing to record init functions on boot up
Adding a hook into free_reserve_area() that informs ftrace that boot up init text is being free, lets ftrace safely remove those init functions from its records, which keeps ftrace from trying to modify text that no longer exists. Note, this still does not allow for tracing .init text of modules, as modules require different work for freeing its init code. Link: http://lkml.kernel.org/r/1488502497.7212.24.camel@linux.intel.com Cc: linux-mm@kvack.org Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Peter Zijlstra <peterz@infradead.org> Requested-by: Todd Brandt <todd.e.brandt@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 79af0962fd52..94769d687cf0 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -39,7 +39,7 @@
/* These are for everybody (although not all archs will actually
discard it in modules) */
-#define __init __section(.init.text) __cold notrace __latent_entropy
+#define __init __section(.init.text) __cold __inittrace __latent_entropy
#define __initdata __section(.init.data)
#define __initconst __section(.init.rodata)
#define __exitdata __section(.exit.data)
@@ -68,8 +68,10 @@
#ifdef MODULE
#define __exitused
+#define __inittrace notrace
#else
#define __exitused __used
+#define __inittrace
#endif
#define __exit __section(.exit.text) __exitused __cold notrace