Commit 3594136ad67a54d77bcb2547e70011754a2f91d5
Committed by
Thomas Gleixner
1 parent
caf8cdebfb
Exists in
master
and in
20 other branches
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> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
lib/Makefile
... | ... | @@ -8,6 +8,14 @@ |
8 | 8 | sha1.o irq_regs.o reciprocal_div.o argv_split.o \ |
9 | 9 | proportions.o prio_heap.o ratelimit.o |
10 | 10 | |
11 | +ifdef CONFIG_FTRACE | |
12 | +# Do not profile string.o, since it may be used in early boot or vdso | |
13 | +ORIG_CFLAGS := $(KBUILD_CFLAGS) | |
14 | +KBUILD_CFLAGS = $(if $(subst string,,$(basename $(notdir $@))), \ | |
15 | + $(ORIG_CFLAGS), \ | |
16 | + $(subst -pg,,$(ORIG_CFLAGS))) | |
17 | +endif | |
18 | + | |
11 | 19 | lib-$(CONFIG_MMU) += ioremap.o |
12 | 20 | lib-$(CONFIG_SMP) += cpumask.o |
13 | 21 |