Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476AbYAWQyQ (ORCPT ); Wed, 23 Jan 2008 11:54:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752415AbYAWQyA (ORCPT ); Wed, 23 Jan 2008 11:54:00 -0500 Received: from ms-smtp-02.nyroc.rr.com ([24.24.2.56]:48839 "EHLO ms-smtp-02.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbYAWQx7 (ORCPT ); Wed, 23 Jan 2008 11:53:59 -0500 Date: Wed, 23 Jan 2008 11:53:53 -0500 From: Steven Rostedt To: LKML Cc: Ingo Molnar , Linus Torvalds , Andrew Morton , Peter Zijlstra , Christoph Hellwig , Mathieu Desnoyers , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Tim Bird , Sam Ravnborg , "Frank Ch. Eigler" , Jan Kiszka , John Stultz , Arjan van de Ven , Steven Rostedt Subject: Re: [PATCH 19/20 -v5] Trace irq disabled critical timings Message-ID: <20080123165353.GA12598@goodmis.org> References: <20080123160236.969334052@goodmis.org> <20080123160444.197366580@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080123160444.197366580@goodmis.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2489 Lines: 90 On Wed, Jan 23, 2008 at 11:02:55AM -0500, Steven Rostedt wrote: > This patch adds latency tracing for critical timings > (how long interrupts are disabled for). > > "irqsoff" is added to /debugfs/tracing/available_tracers > > Index: linux-mcount.git/kernel/lockdep.c > =================================================================== > --- linux-mcount.git.orig/kernel/lockdep.c 2008-01-23 10:26:11.000000000 -0500 > +++ linux-mcount.git/kernel/lockdep.c 2008-01-23 10:27:53.000000000 -0500 > @@ -39,6 +39,7 @@ > #include > #include > #include > +#include > > #include > > @@ -2009,7 +2010,7 @@ void early_boot_irqs_on(void) > /* > * Hardirqs will be enabled: > */ > -void trace_hardirqs_on(void) > +void notrace trace_hardirqs_on_caller(unsigned long a0) > { > struct task_struct *curr = current; > unsigned long ip; > @@ -2050,14 +2051,24 @@ void trace_hardirqs_on(void) > curr->hardirq_enable_ip = ip; > curr->hardirq_enable_event = ++curr->irq_events; > debug_atomic_inc(&hardirqs_on_events); > + time_hardirqs_on(CALLER_ADDR0, a0); > } > +EXPORT_SYMBOL(trace_hardirqs_on_caller); > > +void notrace trace_hardirqs_on(void) { > + trace_hardirqs_on_caller(CALLER_ADDR0); > +} > EXPORT_SYMBOL(trace_hardirqs_on); > vvvvvvvvvvvvvvvv > +void notrace trace_hardirqs_off(void) { > + trace_hardirqs_off_caller(CALLER_ADDR0); > +} > +EXPORT_SYMBOL(trace_hardirqs_off); > + ^^^^^^^^^^^^^^^^ > /* > * Hardirqs were disabled: > */ > -void trace_hardirqs_off(void) > +void notrace trace_hardirqs_off_caller(unsigned long a0) > { > struct task_struct *curr = current; > > @@ -2075,10 +2086,15 @@ void trace_hardirqs_off(void) > curr->hardirq_disable_ip = _RET_IP_; > curr->hardirq_disable_event = ++curr->irq_events; > debug_atomic_inc(&hardirqs_off_events); > + time_hardirqs_off(CALLER_ADDR0, a0); > } else > debug_atomic_inc(&redundant_hardirqs_off); > } > > +void notrace trace_hardirqs_off(void) { > + trace_hardirqs_off_caller(CALLER_ADDR0); > +} > + > EXPORT_SYMBOL(trace_hardirqs_off); > Bah, I didn't refresh quilt! I'll update the website with a -v5a with this fix. -- Steve > /* -- 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/