--- zzzz-none-000/linux-2.6.39.4/kernel/softirq.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/kernel/softirq.c 2021-11-10 13:23:10.000000000 +0000 @@ -24,6 +24,10 @@ #include #include #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ +#include "linux/kallsyms.h" // sprint_symbol() #define CREATE_TRACE_POINTS #include @@ -235,13 +239,22 @@ kstat_incr_softirqs_this_cpu(vec_nr); trace_softirq_entry(vec_nr); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_sw_irq_begin, (unsigned int)(h->action), (unsigned int)h); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ h->action(h); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_sw_irq_end, (unsigned int)(h->action), (unsigned int)h); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ + trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { - printk(KERN_ERR "huh, entered softirq %u %s %p" + char buf[256]; + sprint_symbol(buf, (unsigned long)h->action); + printk(KERN_ERR "huh, entered softirq %u %s %p (%s)" "with preempt_count %08x," " exited with %08x?\n", vec_nr, - softirq_to_name[vec_nr], h->action, + softirq_to_name[vec_nr], h->action, buf, prev_count, preempt_count()); preempt_count() = prev_count; } @@ -452,7 +465,13 @@ if (!atomic_read(&t->count)) { if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_tasklet_begin, (unsigned int)(t->func), (unsigned int)(t->data)); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ t->func(t->data); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_tasklet_end, (unsigned int)(t->func), (unsigned int)(t->data)); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ tasklet_unlock(t); continue; } @@ -487,7 +506,13 @@ if (!atomic_read(&t->count)) { if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hi_tasklet_begin, (unsigned int)(t->func), (unsigned int)(t->data)); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ t->func(t->data); +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_log(avm_profile_data_type_hi_tasklet_end, (unsigned int)(t->func), (unsigned int)(t->data)); +#endif /*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ tasklet_unlock(t); continue; }