[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1287437213.16971.333.camel@gandalf.stny.rr.com>
Date: Mon, 18 Oct 2010 17:26:53 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Sam Ravnborg <sam@...nborg.org>, Michal Marek <mmarek@...e.cz>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: [PATCH v2][GIT PULL] ftrace: Remove recursion between recordmcount
and scripts/mod/empty
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@...hat.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@...nborg.org> ]
Reported-by: Ingo Molnar <mingo@...e.hu>
Tested-by: Ingo Molnar <mingo@...e.hu>
Cc: Michal Marek <mmarek@...e.cz>
Cc: linux-kbuild@...r.kernel.org
Signed-off-by: Steven Rostedt <rostedt@...dmis.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)" \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists