microblaze: ftrace: add static function tracer
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>
Showing
- arch/microblaze/Kconfig 1 addition, 0 deletionsarch/microblaze/Kconfig
- arch/microblaze/include/asm/ftrace.h 14 additions, 0 deletionsarch/microblaze/include/asm/ftrace.h
- arch/microblaze/kernel/Makefile 11 additions, 0 deletionsarch/microblaze/kernel/Makefile
- arch/microblaze/kernel/cpu/Makefile 4 additions, 0 deletionsarch/microblaze/kernel/cpu/Makefile
- arch/microblaze/kernel/mcount.S 105 additions, 0 deletionsarch/microblaze/kernel/mcount.S
- arch/microblaze/kernel/microblaze_ksyms.c 5 additions, 0 deletionsarch/microblaze/kernel/microblaze_ksyms.c
Loading
Please register or sign in to comment