tracing: move scripts/trace/power.pl to scripts/tracing/power.pl
[safe/jmp/linux-2.6] / kernel / softirq.c
index 9f90fdc..65ff3e3 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/ftrace.h>
 #include <linux/smp.h>
 #include <linux/tick.h>
+#include <trace/irq.h>
 
 #include <asm/irq.h>
 /*
@@ -54,9 +55,8 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp
 static DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
 
 char *softirq_to_name[NR_SOFTIRQS] = {
-       "HI_SOFTIRQ", "TIMER_SOFTIRQ", "NET_TX_SOFTIRQ", "NET_RX_SOFTIRQ",
-       "BLOCK_SOFTIRQ", "TASKLET_SOFTIRQ", "SCHED_SOFTIRQ", "HRTIMER_SOFTIRQ",
-       "RCU_SOFTIRQ"
+       "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK",
+       "TASKLET", "SCHED", "HRTIMER",  "RCU"
 };
 
 /*
@@ -186,6 +186,9 @@ EXPORT_SYMBOL(local_bh_enable_ip);
  */
 #define MAX_SOFTIRQ_RESTART 10
 
+DEFINE_TRACE(softirq_entry);
+DEFINE_TRACE(softirq_exit);
+
 asmlinkage void __do_softirq(void)
 {
        struct softirq_action *h;
@@ -212,8 +215,9 @@ restart:
                if (pending & 1) {
                        int prev_count = preempt_count();
 
+                       trace_softirq_entry(h, softirq_vec);
                        h->action(h);
-
+                       trace_softirq_exit(h, softirq_vec);
                        if (unlikely(prev_count != preempt_count())) {
                                printk(KERN_ERR "huh, entered softirq %td %s %p"
                                       "with preempt_count %08x,"