 7d241ff056
			
		
	
	
	7d241ff056
	
	
	
		
			
			With dynamic function tracer, by default, _mcount is defined as an "empty" function, it returns directly without any more action. When enabling it in user-space, it will jump to a real tracing function(ftrace_caller), and do the real job for us. Differ from the static function tracer, dynamic function tracer provides two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the tracing of some indicated kernel functions(set_ftrace_filter). In the kernel version, there is only one "_mcount" string for every kernel function, so, we just need to match this one in mcount_regex of scripts/recordmcount.pl. For more information please look at code and Documentation/trace folder. Steven ACK that scripts/recordmcount.pl part. Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Michal Simek <monstr@monstr.eu>
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			593 B
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			593 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
 | |
| 
 | |
| #ifdef CONFIG_DYNAMIC_FTRACE
 | |
| /* reloction of mcount call site is the same as the address */
 | |
| static inline unsigned long ftrace_call_adjust(unsigned long addr)
 | |
| {
 | |
| 	return addr;
 | |
| }
 | |
| 
 | |
| struct dyn_arch_ftrace {
 | |
| };
 | |
| #endif /* CONFIG_DYNAMIC_FTRACE */
 | |
| 
 | |
| #endif /* CONFIG_FUNCTION_TRACER */
 | |
| #endif /* _ASM_MICROBLAZE_FTRACE */
 |