summaryrefslogtreecommitdiffstats
path: root/kernel/softirq.c
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2009-03-12 14:33:36 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-12 21:15:02 -0400
commit5d592b44b29a1d73e13d5c9e3426eed843bdc359 (patch)
treee26ec625e6fb5efdbbf41d0bba940a2dbac19f50 /kernel/softirq.c
parente447e1df2e568cd43d1918963c9f09fae85aea57 (diff)
downloadop-kernel-dev-5d592b44b29a1d73e13d5c9e3426eed843bdc359.zip
op-kernel-dev-5d592b44b29a1d73e13d5c9e3426eed843bdc359.tar.gz
tracing: tracepoints for softirq entry/exit - add softirq-to-name array
Create a 'softirq_to_name' array, which is indexed by softirq #, so that we can easily convert between the softirq index # and its name, in order to get more meaningful output messages. LKML-Reference: <20090312183336.GB3352@redhat.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r--kernel/softirq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 7571bcb..9f90fdc 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -53,6 +53,12 @@ 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"
+};
+
/*
* we cannot loop indefinitely here to avoid userspace starvation,
* but we also don't want to introduce a worst case 1/HZ latency
@@ -209,9 +215,10 @@ restart:
h->action(h);
if (unlikely(prev_count != preempt_count())) {
- printk(KERN_ERR "huh, entered softirq %td %p"
+ printk(KERN_ERR "huh, entered softirq %td %s %p"
"with preempt_count %08x,"
" exited with %08x?\n", h - softirq_vec,
+ softirq_to_name[h - softirq_vec],
h->action, prev_count, preempt_count());
preempt_count() = prev_count;
}
OpenPOWER on IntegriCloud