From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755355AbYJZO0P (ORCPT ); Sun, 26 Oct 2008 10:26:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754145AbYJZOZ7 (ORCPT ); Sun, 26 Oct 2008 10:25:59 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:50385 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753962AbYJZOZ6 (ORCPT ); Sun, 26 Oct 2008 10:25:58 -0400 Date: Sun, 26 Oct 2008 07:25:56 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Peter Zijlstra , LKML , Ingo Molnar , Thomas Gleixner , Arnaldo Carvalho de Melo , Andrew Morton , Linus Torvalds , Arjan van de Ven , Frederic Weisbecker Subject: Re: [PATCH v2][RFC] ftrace: function oprofiler Message-ID: <20081026142556.GB6419@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1225017357.27415.5.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 26, 2008 at 09:58:01AM -0400, Steven Rostedt wrote: > > On Sun, 26 Oct 2008, Peter Zijlstra wrote: > > > On Sat, 2008-10-25 at 20:55 -0400, Steven Rostedt wrote: > > > > > This is a function profiler to count the number of times a function is hit. > > > > I have to ask, _why_? > > > > It seems like a nice enough gimmick, but is this information actually > > useful? > > Well, it does let you know for sure which functions are the hottest paths. > Perhaps you have a "slow path" function. This will show you how slow > that slow path is. That is, how many times it is hit compared to the > fast path. And the ratio between the "hot path" and the "slow path" can be very helpful in working out what sorts of optimizations can be used. Is a give optimization that gains a factor of ten on the hot path and loses a factor of 50 on the slow path a win? Of course, you also need some estimate of the cost of the hot paths and the slow paths. Thanx, Paul > With dynamic ftrace, you can also pick and choose which functions > are to be counted. > > What is also nice about it (and something that I will use it for), is that > it will show you the functions that will be hit the most during a trace. > If you do not care about those functions, then you can easily filter them > out for your trace. > > This patch is also a proof of concept. I'm sure others can think of more > useful things to do by adding more stuff to this patch.