Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753183AbYKFVNg (ORCPT ); Thu, 6 Nov 2008 16:13:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751150AbYKFVN1 (ORCPT ); Thu, 6 Nov 2008 16:13:27 -0500 Received: from casper.infradead.org ([85.118.1.10]:38377 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbYKFVN0 (ORCPT ); Thu, 6 Nov 2008 16:13:26 -0500 Date: Thu, 6 Nov 2008 13:13:48 -0800 From: Arjan van de Ven To: fche@redhat.com (Frank Ch. Eigler) Cc: Steven Rostedt , Peter Zijlstra , linux-kernel@vger.kernel.org, mingo@elte.hu, alan@redhat.com, jbaron@redhat.com Subject: Re: [PATCH] ftrace: add an fsync tracer Message-ID: <20081106131348.68f8858e@infradead.org> In-Reply-To: References: <20081105094902.27ec4b39@infradead.org> <1225976138.7803.4485.camel@twins> <20081106060624.58a0f967@infradead.org> <1225981141.7803.4577.camel@twins> <20081106063108.02b4813d@infradead.org> <1225983052.7803.4623.camel@twins> <20081106070157.065b2dcc@infradead.org> <20081106094558.50d94bcc@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.6.0 (GTK+ 2.14.4; 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: 1717 Lines: 46 On Thu, 06 Nov 2008 15:19:48 -0500 fche@redhat.com (Frank Ch. Eigler) wrote: > Arjan van de Ven writes: > > > [...] > > what is the real need is > > 1) Have a trace point in the source > > 2) Associate a "formatting function" with that point > > (which basically transforms the trace parameters to, say, a > > string) 3) A way to turn the trace point on/off. > > For 1 and 2, it may be worth considering a plain trace_mark() in > do_sync(). The complication that makes this uglier than a one-liner no why is that? what you really need is to be able to provide a callback function pointer that will do the formatting, or as Peter wants it, a format string. (and we can easily make a format string that knows how to print a struct file, no big deal, I suspect that is a common thing actually) Doing this like you propose is just too complex and too specialistic; the reality is that merely formatting the arguments of a trace point is the common case, and I suspect for 99.9% of the cases we can get away with a standard default formatting. We should make THAT easy. Not complex or ugly. But easy. And then if I or some tool wants to see a tracepoint, we have some standard way to enumerate them and turn individual ones on with their standard formatting ... and that's it. no iffs or buts -- 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/