diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2018-08-06 15:17:46 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-08-16 04:38:38 +0200 |
commit | 2f4df0017baedd535254d987c6b10f855f1fb11f (patch) | |
tree | c035a8d2357ee4c54b584a3ba4153d4673fa057f /Makefile | |
parent | tracing: Avoid calling cc-option -mrecord-mcount for every Makefile (diff) | |
download | linux-2f4df0017baedd535254d987c6b10f855f1fb11f.tar.xz linux-2f4df0017baedd535254d987c6b10f855f1fb11f.zip |
tracing: Add -mcount-nop option support
-mcount-nop gcc option generates the calls to the profiling functions
as nops which allows to avoid patching mcount jump with NOP instructions
initially.
-mcount-nop gcc option will be activated if platform selects
HAVE_NOP_MCOUNT and gcc actually supports it.
In addition to that CC_USING_NOP_MCOUNT is defined and could be used by
architectures to adapt ftrace patching behavior.
Link: http://lkml.kernel.org/r/patch-3.thread-aa7b8d.git-e02ed2dc082b.your-ad-here.call-01533557518-ext-9465@work.hours
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -749,6 +749,12 @@ ifdef CONFIG_FTRACE_MCOUNT_RECORD CC_FLAGS_FTRACE += -mrecord-mcount export CC_USING_RECORD_MCOUNT := 1 endif + ifdef CONFIG_HAVE_NOP_MCOUNT + ifeq ($(call cc-option-yn, -mnop-mcount),y) + CC_FLAGS_FTRACE += -mnop-mcount + CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT + endif + endif endif ifdef CONFIG_HAVE_FENTRY ifeq ($(call cc-option-yn, -mfentry),y) |