[ltt-dev] [LTTng][RFC][Patch 2/2] add irq-id parameter to irq_exit tracepoint and marker
Masami Hiramatsu
mhiramat at redhat.com
Tue Aug 26 11:32:26 EDT 2008
Add irq id parameter to irq_exit tracepoint and marker
irq_id parameter is useful for paring irq enter and exit events.
Signed-off-by: Masami Hiramatsu <mhiramat at redhat.com>
Signed-off-by: Hideo Aoki <haoki at redhat.com>
---
arch/x86/kernel/apic_32.c | 6 +++---
arch/x86/kernel/apic_64.c | 6 +++---
arch/x86/kernel/cpu/mcheck/mce_intel_64.c | 2 +-
arch/x86/kernel/cpu/mcheck/p4.c | 2 +-
arch/x86/kernel/tlb_32.c | 2 +-
arch/x86/kernel/tlb_64.c | 2 +-
include/trace/irq.h | 4 ++--
kernel/irq/handle.c | 2 +-
kernel/kernel-trace.c | 5 +++--
9 files changed, 16 insertions(+), 15 deletions(-)
Index: linux-2.6-lttng/include/trace/irq.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/irq.h 2008-08-19 21:45:16.000000000 -0400
+++ linux-2.6-lttng/include/trace/irq.h 2008-08-21 14:38:29.000000000 -0400
@@ -9,8 +9,8 @@
TPPROTO(unsigned int id, struct pt_regs *regs),
TPARGS(id, regs));
DEFINE_TRACE(irq_exit,
- TPPROTO(irqreturn_t retval),
- TPARGS(retval));
+ TPPROTO(unsigned int id, irqreturn_t retval),
+ TPARGS(id, retval));
DEFINE_TRACE(irq_softirq_entry,
TPPROTO(struct softirq_action *h, struct softirq_action *softirq_vec),
TPARGS(h, softirq_vec));
Index: linux-2.6-lttng/kernel/irq/handle.c
===================================================================
--- linux-2.6-lttng.orig/kernel/irq/handle.c 2008-08-19 21:45:16.000000000 -0400
+++ linux-2.6-lttng/kernel/irq/handle.c 2008-08-21 14:34:29.000000000 -0400
@@ -153,7 +153,7 @@
add_interrupt_randomness(irq);
local_irq_disable();
- trace_irq_exit(retval);
+ trace_irq_exit(irq, retval);
return retval;
}
Index: linux-2.6-lttng/kernel/kernel-trace.c
===================================================================
--- linux-2.6-lttng.orig/kernel/kernel-trace.c 2008-08-19 21:45:16.000000000 -0400
+++ linux-2.6-lttng/kernel/kernel-trace.c 2008-08-21 15:58:39.000000000 -0400
@@ -18,9 +18,10 @@
(regs)?instruction_pointer(regs):0UL);
}
-static void probe_irq_exit(irqreturn_t retval)
+static void probe_irq_exit(unsigned int id, irqreturn_t retval)
{
- trace_mark(kernel_irq_exit, "handled #1u%u", IRQ_RETVAL(retval));
+ trace_mark(kernel_irq_exit, "irq_id %u handled #1u%u",
+ id, IRQ_RETVAL(retval));
}
static void probe_irq_softirq_entry(struct softirq_action *h,
Index: linux-2.6-lttng/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/apic_32.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/apic_32.c 2008-08-21 16:00:43.000000000 -0400
@@ -638,7 +638,7 @@
local_apic_timer_interrupt();
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(LOCAL_TIMER_VECTOR, IRQ_HANDLED);
irq_exit();
@@ -1301,7 +1301,7 @@
"should never happen.\n", smp_processor_id());
__get_cpu_var(irq_stat).irq_spurious_count++;
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(SPURIOUS_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
@@ -1337,7 +1337,7 @@
printk(KERN_DEBUG "APIC error on CPU%d: %02lx(%02lx)\n",
smp_processor_id(), v , v1);
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(ERROR_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
Index: linux-2.6-lttng/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/apic_64.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/apic_64.c 2008-08-21 16:01:05.000000000 -0400
@@ -493,7 +493,7 @@
irq_enter();
trace_irq_entry(LOCAL_TIMER_VECTOR, regs);
local_apic_timer_interrupt();
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(LOCAL_TIMER_VECTOR, IRQ_HANDLED);
irq_exit();
set_irq_regs(old_regs);
}
@@ -977,7 +977,7 @@
add_pda(irq_spurious_count, 1);
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(SPURIOUS_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
@@ -1014,7 +1014,7 @@
printk(KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
smp_processor_id(), v , v1);
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(ERROR_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
Index: linux-2.6-lttng/arch/x86/kernel/cpu/mcheck/mce_intel_64.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/cpu/mcheck/mce_intel_64.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/cpu/mcheck/mce_intel_64.c 2008-08-21 16:01:44.000000000 -0400
@@ -31,7 +31,7 @@
add_pda(irq_thermal_count, 1);
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(THERMAL_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
Index: linux-2.6-lttng/arch/x86/kernel/cpu/mcheck/p4.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/cpu/mcheck/p4.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/cpu/mcheck/p4.c 2008-08-21 16:01:25.000000000 -0400
@@ -67,7 +67,7 @@
vendor_thermal_interrupt(regs);
__get_cpu_var(irq_stat).irq_thermal_count++;
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(THERMAL_APIC_VECTOR, IRQ_HANDLED);
irq_exit();
}
Index: linux-2.6-lttng/arch/x86/kernel/tlb_32.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/tlb_32.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/tlb_32.c 2008-08-21 16:02:02.000000000 -0400
@@ -124,7 +124,7 @@
out:
put_cpu_no_resched();
__get_cpu_var(irq_stat).irq_tlb_count++;
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(INVALIDATE_TLB_VECTOR, IRQ_HANDLED);
}
void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
Index: linux-2.6-lttng/arch/x86/kernel/tlb_64.c
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kernel/tlb_64.c 2008-08-19 21:45:13.000000000 -0400
+++ linux-2.6-lttng/arch/x86/kernel/tlb_64.c 2008-08-21 16:02:21.000000000 -0400
@@ -159,7 +159,7 @@
ack_APIC_irq();
cpu_clear(cpu, f->flush_cpumask);
add_pda(irq_tlb_count, 1);
- trace_irq_exit(IRQ_HANDLED);
+ trace_irq_exit(sender, IRQ_HANDLED);
}
void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat at redhat.com
More information about the lttng-dev
mailing list