summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-04-23 11:38:54 +0200
committerIngo Molnar <mingo@elte.hu>2008-04-23 11:38:54 +0200
commitdf1297fe9fd0f1cbd8c057278b9fa9fcd4ea0d38 (patch)
treef04613fd89ffc2fc104b3cd103ed27f6ffef0e71 /lib
parentb26a2a60c89315505768aff87ffcb4a9b72541c9 (diff)
ftrace: do not profile lib/string.o
Most archs define the string and memory compare functions in assembly. Some do not. But these functions may be used in some archs at early boot up. Since most archs define this code in assembly and they are not usually traced, there's no need to trace them when they are not defined in assembly. This patch removes the -pg from the CFLAGS for lib/string.o. This prevents the string functions use in either vdso or early bootup from crashing the system. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index bf8000fc7d48..26d98104bdc5 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,6 +8,14 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
sha1.o irq_regs.o reciprocal_div.o argv_split.o \
proportions.o prio_heap.o
+ifdef CONFIG_FTRACE
+# Do not profile string.o, since it may be used in early boot or vdso
+ORIG_CFLAGS := $(KBUILD_CFLAGS)
+KBUILD_CFLAGS = $(if $(subst string,,$(basename $(notdir $@))), \
+ $(ORIG_CFLAGS), \
+ $(subst -pg,,$(ORIG_CFLAGS)))
+endif
+
lib-$(CONFIG_MMU) += ioremap.o
lib-$(CONFIG_SMP) += cpumask.o