Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763220AbZCXQ2V (ORCPT ); Tue, 24 Mar 2009 12:28:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932155AbZCXQ0l (ORCPT ); Tue, 24 Mar 2009 12:26:41 -0400 Received: from smtp.polymtl.ca ([132.207.4.11]:41883 "EHLO smtp.polymtl.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932171AbZCXQ0k (ORCPT ); Tue, 24 Mar 2009 12:26:40 -0400 Message-Id: <20090324160148.238795468@polymtl.ca> References: <20090324155625.420966314@polymtl.ca> User-Agent: quilt/0.46-1 Date: Tue, 24 Mar 2009 11:56:28 -0400 From: Mathieu Desnoyers To: akpm@linux-foundation.org, Ingo Molnar , linux-kernel@vger.kernel.org, ltt-dev@lists.casi.polymtl.ca Cc: Mathieu Desnoyers , Frederic Weisbecker , Jason Baron , Peter Zijlstra , Thomas Gleixner , Russell King , Masami Hiramatsu , "Frank Ch. Eigler" , Hideo AOKI , Takashi Nishiie , Steven Rostedt , Eduard - Gabriel Munteanu Subject: [patch 3/9] LTTng instrumentation tasklets Content-Disposition: inline; filename=lttng-instrumentation-tasklets.patch X-Poly-FromMTA: (test.casi.polymtl.ca [132.207.72.60]) at Tue, 24 Mar 2009 16:22:03 +0000 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3317 Lines: 95 tasklet entry and exit events. Signed-off-by: Mathieu Desnoyers CC: 'Ingo Molnar' CC: Frederic Weisbecker CC: Jason Baron CC: 'Peter Zijlstra' CC: Thomas Gleixner CC: Russell King CC: Masami Hiramatsu CC: "Frank Ch. Eigler" CC: 'Hideo AOKI' CC: Takashi Nishiie CC: 'Steven Rostedt' CC: Eduard - Gabriel Munteanu --- include/trace/irq.h | 13 +++++++++++++ kernel/softirq.c | 10 ++++++++++ 2 files changed, 23 insertions(+) Index: linux-2.6-lttng/kernel/softirq.c =================================================================== --- linux-2.6-lttng.orig/kernel/softirq.c 2009-03-24 11:46:28.000000000 -0400 +++ linux-2.6-lttng/kernel/softirq.c 2009-03-24 11:48:36.000000000 -0400 @@ -23,6 +23,7 @@ #include #include #include +#include #include /* @@ -52,6 +53,11 @@ static struct softirq_action softirq_vec static DEFINE_PER_CPU(struct task_struct *, ksoftirqd); +DEFINE_TRACE(irq_tasklet_high_entry); +DEFINE_TRACE(irq_tasklet_high_exit); +DEFINE_TRACE(irq_tasklet_low_entry); +DEFINE_TRACE(irq_tasklet_low_exit); + /* * we cannot loop indefinitely here to avoid userspace starvation, * but we also don't want to introduce a worst case 1/HZ latency @@ -380,7 +386,9 @@ static void tasklet_action(struct softir if (!atomic_read(&t->count)) { if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); + trace_irq_tasklet_low_entry(t); t->func(t->data); + trace_irq_tasklet_low_exit(t); tasklet_unlock(t); continue; } @@ -415,7 +423,9 @@ static void tasklet_hi_action(struct sof if (!atomic_read(&t->count)) { if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); + trace_irq_tasklet_high_entry(t); t->func(t->data); + trace_irq_tasklet_high_exit(t); tasklet_unlock(t); continue; } Index: linux-2.6-lttng/include/trace/irq.h =================================================================== --- linux-2.6-lttng.orig/include/trace/irq.h 2009-03-24 11:46:29.000000000 -0400 +++ linux-2.6-lttng/include/trace/irq.h 2009-03-24 11:48:36.000000000 -0400 @@ -19,4 +19,17 @@ DECLARE_TRACE(irq_next_handler, TPPROTO(unsigned int id, struct irqaction *action, irqreturn_t ret), TPARGS(id, action, ret)); +DECLARE_TRACE(irq_tasklet_low_entry, + TPPROTO(struct tasklet_struct *t), + TPARGS(t)); +DECLARE_TRACE(irq_tasklet_low_exit, + TPPROTO(struct tasklet_struct *t), + TPARGS(t)); +DECLARE_TRACE(irq_tasklet_high_entry, + TPPROTO(struct tasklet_struct *t), + TPARGS(t)); +DECLARE_TRACE(irq_tasklet_high_exit, + TPPROTO(struct tasklet_struct *t), + TPARGS(t)); + #endif -- Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/