diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-04-12 18:59:10 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-16 14:45:03 -0400 |
commit | 85356f802225fedeee8c3e65bdd93b263ace0a8b (patch) | |
tree | 4b9b29634f4235a7a185a7c3ea2947cef422b99b /scripts/Makefile.build | |
parent | dfad3d598c4bbbaf137588e22bac1ce624529f7e (diff) |
kbuild/recordmcount: Add RECORDMCOUNT_WARN to warn about mcount callers
When mcount is called in a section that ftrace will not modify it into
a nop, we want to warn about this. But not warn about this always. Now
if the user builds the kernel with the option RECORDMCOUNT_WARN=1 then
the build will warn about mcount callers that are ignored and will just
waste execution time.
Acked-by: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Link: http://lkml.kernel.org/r/20110421023738.714956282@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d5f925abe4d2..fdca952f6a40 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -244,13 +244,16 @@ endif | |||
244 | 244 | ||
245 | ifdef CONFIG_FTRACE_MCOUNT_RECORD | 245 | ifdef CONFIG_FTRACE_MCOUNT_RECORD |
246 | ifdef BUILD_C_RECORDMCOUNT | 246 | ifdef BUILD_C_RECORDMCOUNT |
247 | ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") | ||
248 | RECORDMCOUNT_FLAGS = -w | ||
249 | endif | ||
247 | # Due to recursion, we must skip empty.o. | 250 | # Due to recursion, we must skip empty.o. |
248 | # The empty.o file is created in the make process in order to determine | 251 | # The empty.o file is created in the make process in order to determine |
249 | # the target endianness and word size. It is made before all other C | 252 | # the target endianness and word size. It is made before all other C |
250 | # files, including recordmcount. | 253 | # files, including recordmcount. |
251 | sub_cmd_record_mcount = \ | 254 | sub_cmd_record_mcount = \ |
252 | if [ $(@) != "scripts/mod/empty.o" ]; then \ | 255 | if [ $(@) != "scripts/mod/empty.o" ]; then \ |
253 | $(objtree)/scripts/recordmcount "$(@)"; \ | 256 | $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ |
254 | fi; | 257 | fi; |
255 | else | 258 | else |
256 | sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ | 259 | sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ |