Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755026AbYJ2Qkq (ORCPT ); Wed, 29 Oct 2008 12:40:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754017AbYJ2Qkg (ORCPT ); Wed, 29 Oct 2008 12:40:36 -0400 Received: from casper.infradead.org ([85.118.1.10]:32991 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754103AbYJ2Qkg (ORCPT ); Wed, 29 Oct 2008 12:40:36 -0400 Date: Wed, 29 Oct 2008 09:40:58 -0700 From: Arjan van de Ven To: Steven Rostedt Cc: LKML , Theodore Tso , Mike Snitzer , Andrew Morton , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Daniel Walker Subject: Re: [PATCH 1/2 v2][RFC] trace: profile likely and unlikely annotations Message-ID: <20081029094058.50bdaa4b@infradead.org> In-Reply-To: References: <170fa0d20810271529g3c64ae89me29ed8b65a9c3b5e@mail.gmail.com> <20081028001340.GB9797@mit.edu> <20081028143720.GD8869@mit.edu> <20081028074816.04193e04@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1219 Lines: 31 On Wed, 29 Oct 2008 12:35:44 -0400 (EDT) Steven Rostedt wrote: > > Andrew Morton recently suggested having an in-kernel way to profile > likely and unlikely macros. This patch achieves that goal. > > When configured, every(*) likely and unlikely macro gets a counter > attached to it. When the condition is hit, the hit and misses of that > condition are recorded. These numbers can later be retrieved by: > > /debugfs/tracing/profile_likely - All likely markers > /debugfs/tracing/profile_unlikely - All unlikely markers. > I like the general approach it'd be very convenient if the debugfs files also had a percentage-incorrect (or percentage-correct, either way) listed, so that we humans can focus straight on which ones are outliers rather than having to do math in our heads first... -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/