mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 12:57:46 +00:00
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>
16 lines
351 B
C
16 lines
351 B
C
#ifndef _ASM_MICROBLAZE_FTRACE
|
|
#define _ASM_MICROBLAZE_FTRACE
|
|
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
|
|
#define MCOUNT_ADDR ((long)(_mcount))
|
|
#define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */
|
|
|
|
#ifndef __ASSEMBLY__
|
|
extern void _mcount(void);
|
|
extern void ftrace_call_graph(void);
|
|
#endif
|
|
|
|
#endif /* CONFIG_FUNCTION_TRACER */
|
|
#endif /* _ASM_MICROBLAZE_FTRACE */
|