--- zzzz-none-000/linux-2.6.28.10/kernel/timer.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/kernel/timer.c 2013-10-18 12:55:51.000000000 +0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,6 +45,10 @@ #include #include +#if defined(CONFIG_FUSIV_KERNEL_PROFILER_MODULE) && CONFIG_FUSIV_KERNEL_PROFILER_MODULE +extern int loggerProfile(unsigned long event); +#endif + u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES; EXPORT_SYMBOL(jiffies_64); @@ -864,7 +869,13 @@ spin_unlock_irq(&base->lock); { int preempt_count = preempt_count(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_timer_begin, (unsigned int)fn, (unsigned int)data); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ fn(data); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_timer_end, (unsigned int)fn, (unsigned int)data); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ if (preempt_count != preempt_count()) { printk(KERN_ERR "huh, entered %p " "with preempt_count %08x, exited" @@ -1042,6 +1053,7 @@ struct task_struct *p = current; int cpu = smp_processor_id(); + /*--- printk("[ut]"); ---*/ /* Note: this timer irq context must be accounted for as well. */ account_process_tick(p, user_tick); run_local_timers(); @@ -1100,10 +1112,21 @@ { struct tvec_base *base = __get_cpu_var(tvec_bases); +#if defined(CONFIG_FUSIV_KERNEL_PROFILER_MODULE) && CONFIG_FUSIV_KERNEL_PROFILER_MODULE + int profileResult; + profileResult = loggerProfile(run_timer_softirq); +#endif + hrtimer_run_pending(); if (time_after_eq(jiffies, base->timer_jiffies)) __run_timers(base); + +#if defined(CONFIG_FUSIV_KERNEL_PROFILER_MODULE) && CONFIG_FUSIV_KERNEL_PROFILER_MODULE + if(profileResult == 0) + profileResult = loggerProfile(run_timer_softirq); +#endif + } /*