2fd7c761a2
If -pg of gcc is enabled with CONFIG_FUNCTION_TRACER=y. a calling to _mcount will be inserted into each kernel function. so, there is a possibility to trace the kernel functions in _mcount. This patch add the specific _mcount support for static function tracing. by default, ftrace_trace_function is initialized as ftrace_stub(an empty function), so, the default _mcount will introduce very little overhead. after enabling ftrace in user-space, it will jump to a real tracing function and do static function tracing for us. Commit message from Wu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
33 lines
843 B
Makefile
33 lines
843 B
Makefile
#
|
|
# Makefile
|
|
#
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
# Do not trace early boot code and low level code
|
|
CFLAGS_REMOVE_timer.o = -pg
|
|
CFLAGS_REMOVE_intc.o = -pg
|
|
CFLAGS_REMOVE_early_printk.o = -pg
|
|
CFLAGS_REMOVE_selfmod.o = -pg
|
|
CFLAGS_REMOVE_heartbeat.o = -pg
|
|
CFLAGS_REMOVE_ftrace.o = -pg
|
|
endif
|
|
|
|
extra-y := head.o vmlinux.lds
|
|
|
|
obj-y += exceptions.o \
|
|
hw_exception_handler.o init_task.o intc.o irq.o of_device.o \
|
|
of_platform.o process.o prom.o prom_parse.o ptrace.o \
|
|
setup.o signal.o sys_microblaze.o timer.o traps.o reset.o
|
|
|
|
obj-y += cpu/
|
|
|
|
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
|
obj-$(CONFIG_SELFMOD) += selfmod.o
|
|
obj-$(CONFIG_HEART_BEAT) += heartbeat.o
|
|
obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
|
|
obj-$(CONFIG_MMU) += misc.o
|
|
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
|
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o
|
|
|
|
obj-y += entry$(MMU).o
|