aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-17 11:40:48 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-17 11:40:48 -0400
commit2464a609ded094204a3aed24823745ec58e3c879 (patch)
tree54080daf81746787dbd11160752e04b9652b8728 /lib
parentc349e0a01c3e0f70913db6a5bb61ab204e0602de (diff)
ftrace: do not trace library functions
make function tracing more robust: do not trace library functions. We've already got a sizable list of exceptions: ifdef CONFIG_FTRACE # Do not profile string.o, since it may be used in early boot or vdso CFLAGS_REMOVE_string.o = -pg # Also do not profile any debug utilities CFLAGS_REMOVE_spinlock_debug.o = -pg CFLAGS_REMOVE_list_debug.o = -pg CFLAGS_REMOVE_debugobjects.o = -pg CFLAGS_REMOVE_find_next_bit.o = -pg CFLAGS_REMOVE_cpumask.o = -pg CFLAGS_REMOVE_bitmap.o = -pg endif ... and the pattern has been that random library functionality showed up in ftrace's critical path (outside of its recursion check), causing hard to debug lockups. So be a bit defensive about it and exclude all lib/*.o functions by default. It's not that they are overly interesting for tracing purposes anyway. Specific ones can still be traced, in an opt-in manner. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/Makefile b/lib/Makefile
index d90d31102e05..818c4d455518 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -2,24 +2,17 @@
2# Makefile for some libs needed in the kernel. 2# Makefile for some libs needed in the kernel.
3# 3#
4 4
5ifdef CONFIG_FTRACE
6ORIG_CFLAGS := $(KBUILD_CFLAGS)
7KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
8endif
9
5lib-y := ctype.o string.o vsprintf.o cmdline.o \ 10lib-y := ctype.o string.o vsprintf.o cmdline.o \
6 rbtree.o radix-tree.o dump_stack.o \ 11 rbtree.o radix-tree.o dump_stack.o \
7 idr.o int_sqrt.o extable.o prio_tree.o \ 12 idr.o int_sqrt.o extable.o prio_tree.o \
8 sha1.o irq_regs.o reciprocal_div.o argv_split.o \ 13 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
9 proportions.o prio_heap.o ratelimit.o 14 proportions.o prio_heap.o ratelimit.o
10 15
11ifdef CONFIG_FTRACE
12# Do not profile string.o, since it may be used in early boot or vdso
13CFLAGS_REMOVE_string.o = -pg
14# Also do not profile any debug utilities
15CFLAGS_REMOVE_spinlock_debug.o = -pg
16CFLAGS_REMOVE_list_debug.o = -pg
17CFLAGS_REMOVE_debugobjects.o = -pg
18CFLAGS_REMOVE_find_next_bit.o = -pg
19CFLAGS_REMOVE_cpumask.o = -pg
20CFLAGS_REMOVE_bitmap.o = -pg
21endif
22
23lib-$(CONFIG_MMU) += ioremap.o 16lib-$(CONFIG_MMU) += ioremap.o
24lib-$(CONFIG_SMP) += cpumask.o 17lib-$(CONFIG_SMP) += cpumask.o
25 18