* [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty
@ 2010-10-18 21:26 Steven Rostedt
2010-10-18 23:39 ` Andrew Morton
2010-10-19 6:21 ` Ingo Molnar
0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-10-18 21:26 UTC (permalink / raw)
To: LKML
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Sam Ravnborg,
Michal Marek, linux-kbuild
Ingo,
Please pull the latest tip/perf/recordmcount-2 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/recordmcount-2
Steven Rostedt (1):
ftrace: Remove recursion between recordmcount and scripts/mod/empty
----
scripts/Makefile.build | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---------------------------
commit d7b4d6de57d414a6384376880f2caf7125a45494
Author: Steven Rostedt <srostedt@redhat.com>
Date: Mon Oct 18 14:42:00 2010 -0400
ftrace: Remove recursion between recordmcount and scripts/mod/empty
When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
all objects are run through the recordmcount program to create a
separate section that stores all the callers of mcount.
The build process has a special file: scripts/mod/empty.o. This is
built from empty.c which is literally an empty file (except for a
single comment). This file is used to find information about the target
elf format, like endianness and word size.
The problem comes up when we need to build recordmcount. The
build process requires that empty.o is built first. The build rules
for empty.o will try to execute recordmcount on the empty.o file.
We get an error that recordmcount does not exist.
To avoid this recursion, the build file will skip running recordmcount
if the file that it is building is script/mod/empty.o.
[ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]
Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 4db60b2..843bd4f 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -210,7 +210,13 @@ endif
ifdef CONFIG_FTRACE_MCOUNT_RECORD
ifdef BUILD_C_RECORDMCOUNT
-cmd_record_mcount = $(objtree)/scripts/recordmcount "$(@)";
+# Due to recursion, we must skip empty.o.
+# The empty.o file is created in the make process in order to determine
+# the target endianness and word size. It is made before all other C
+# files, including recordmcount.
+cmd_record_mcount = if [ $(@) != "scripts/mod/empty.o" ]; then \
+ $(objtree)/scripts/recordmcount "$(@)"; \
+ fi;
else
cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
"$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty
2010-10-18 21:26 [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty Steven Rostedt
@ 2010-10-18 23:39 ` Andrew Morton
2010-10-19 0:48 ` Steven Rostedt
2010-10-19 6:21 ` Ingo Molnar
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2010-10-18 23:39 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Ingo Molnar, Frederic Weisbecker, Sam Ravnborg,
Michal Marek, linux-kbuild
On Mon, 18 Oct 2010 17:26:53 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> Please pull the latest tip/perf/recordmcount-2 tree
Today's linux-next has some problems.
make mrproper
make allmodconfig
make
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
/bin/sh: /usr/src/25/scripts/recordmcount: No such file or directory
If you run `make' a few times, scritps/recordmcount eventually turns
up and the build runs OK. Some ordering thing or a race or whatever?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty
2010-10-18 23:39 ` Andrew Morton
@ 2010-10-19 0:48 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-10-19 0:48 UTC (permalink / raw)
To: Andrew Morton
Cc: LKML, Ingo Molnar, Frederic Weisbecker, Sam Ravnborg,
Michal Marek, linux-kbuild
On Mon, 2010-10-18 at 16:39 -0700, Andrew Morton wrote:
> On Mon, 18 Oct 2010 17:26:53 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > Please pull the latest tip/perf/recordmcount-2 tree
>
> Today's linux-next has some problems.
>
> make mrproper
> make allmodconfig
> make
>
> CHK include/linux/version.h
> UPD include/linux/version.h
> CHK include/generated/utsrelease.h
> UPD include/generated/utsrelease.h
> CC kernel/bounds.s
> GEN include/generated/bounds.h
> CC arch/x86/kernel/asm-offsets.s
> GEN include/generated/asm-offsets.h
> CALL scripts/checksyscalls.sh
> HOSTCC scripts/genksyms/genksyms.o
> SHIPPED scripts/genksyms/lex.c
> SHIPPED scripts/genksyms/parse.h
> SHIPPED scripts/genksyms/keywords.c
> HOSTCC scripts/genksyms/lex.o
> SHIPPED scripts/genksyms/parse.c
> HOSTCC scripts/genksyms/parse.o
> HOSTLD scripts/genksyms/genksyms
> CC scripts/mod/empty.o
> /bin/sh: /usr/src/25/scripts/recordmcount: No such file or directory
>
> If you run `make' a few times, scritps/recordmcount eventually turns
> up and the build runs OK. Some ordering thing or a race or whatever?
The patch you just replied to fixes this :-)
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty
2010-10-18 21:26 [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty Steven Rostedt
2010-10-18 23:39 ` Andrew Morton
@ 2010-10-19 6:21 ` Ingo Molnar
1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2010-10-19 6:21 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Andrew Morton, Frederic Weisbecker, Sam Ravnborg,
Michal Marek, linux-kbuild
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo,
>
> Please pull the latest tip/perf/recordmcount-2 tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/perf/recordmcount-2
>
>
> Steven Rostedt (1):
> ftrace: Remove recursion between recordmcount and scripts/mod/empty
>
> ----
> scripts/Makefile.build | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
Pulled, thanks Steve!
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-19 6:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 21:26 [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount and scripts/mod/empty Steven Rostedt
2010-10-18 23:39 ` Andrew Morton
2010-10-19 0:48 ` Steven Rostedt
2010-10-19 6:21 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox