1#include <linux/config.h> 2#include <linux/kernprof.h> 3#include <linux/module.h> 4 5/* profiling function to call in timer interrupt */ 6prof_hook_p prof_timer_hook = 0; 7 8/* profiling function to call in perf counter interrupt */ 9prof_hook_p prof_perfctr_hook = 0; 10 11/* profiling function to call in scheduler upon switch-out */ 12mcount_hook_p prof_scheduler_hook = 0; 13 14/* profiling function to call in scheduler upon wake-up */ 15wakeup_hook_p prof_wakeup_hook = 0; 16 17/* profiling function called by mcount() */ 18mcount_hook_p mcount_hook = 0; 19 20#ifdef CONFIG_FRAME_POINTER 21int prof_have_frameptr = 1; 22#else 23int prof_have_frameptr = 0; 24#endif 25#ifdef CONFIG_MCOUNT 26int prof_have_mcount = 1; 27#else 28int prof_have_mcount = 0; 29#endif 30 31/* 32 * The following functions are defined so their names may appear in profiles. 33 * They are not intended to be called. 34 */ 35void USER(void) {} 36void UNKNOWN_KERNEL(void) {} 37void FIRMWARE(void) {} 38void STALLED(void) {} 39void SLEEPING(void) {} 40void MODULE(void) {} 41 42EXPORT_SYMBOL_NOVERS(USER); 43EXPORT_SYMBOL_NOVERS(UNKNOWN_KERNEL); 44EXPORT_SYMBOL_NOVERS(FIRMWARE); 45EXPORT_SYMBOL_NOVERS(STALLED); 46EXPORT_SYMBOL_NOVERS(SLEEPING); 47EXPORT_SYMBOL_NOVERS(MODULE); 48EXPORT_SYMBOL(prof_timer_hook); 49EXPORT_SYMBOL(prof_perfctr_hook); 50EXPORT_SYMBOL(prof_scheduler_hook); 51EXPORT_SYMBOL(prof_wakeup_hook); 52EXPORT_SYMBOL(mcount_hook); 53EXPORT_SYMBOL_NOVERS(_stext); 54EXPORT_SYMBOL_NOVERS(_etext); 55EXPORT_SYMBOL(prof_have_frameptr); 56EXPORT_SYMBOL(prof_have_mcount); 57