Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030225AbWI0QNp (ORCPT ); Wed, 27 Sep 2006 12:13:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030227AbWI0QNp (ORCPT ); Wed, 27 Sep 2006 12:13:45 -0400 Received: from mx1.redhat.com ([66.187.233.31]:12481 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1030225AbWI0QNo (ORCPT ); Wed, 27 Sep 2006 12:13:44 -0400 To: Mathieu Desnoyers Cc: Martin Bligh , Masami Hiramatsu , prasanna@in.ibm.com, Andrew Morton , Ingo Molnar , Paul Mundt , linux-kernel , Jes Sorensen , Tom Zanussi , Richard J Moore , Michel Dagenais , Christoph Hellwig , Greg Kroah-Hartman , Thomas Gleixner , William Cohen , ltt-dev@shafik.org, systemtap@sources.redhat.com, Alan Cox , Jeremy Fitzhardinge , Karim Yaghmour , Pavel Machek , Joe Perches , "Randy.Dunlap" , "Jose R. Santos" Subject: Re: [PATCH] Linux Kernel Markers 0.11 for 2.6.17 References: <20060925151028.GA14695@Krystal> <20060925160115.GE25296@redhat.com> <20060925232828.GA29343@Krystal> <20060927013020.GA5171@Krystal> From: fche@redhat.com (Frank Ch. Eigler) Date: 27 Sep 2006 12:12:09 -0400 In-Reply-To: <20060927013020.GA5171@Krystal> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3160 Lines: 74 Hi - Mathieu Desnoyers writes: > [...] > > That involves new conventions beyond printf. Why not "%p %p %u %u" > > for two blobs ... or why implicitly dereference the given pointers. A > > probe handler unaware of a specific marker's semantics would not know > > whether or not this is implied. > > [...] > So yes, there is a semantic to create, but I don't see the problem with that. That's a part of my point. The marker data types marked up with printf directives do not fully describe the data - in this case whether it is a raw pointer or a data blob that is being marked. > And why would the probe actually know what to do with a pointer ? If > it only wants to record the pointer's address or if it wants to > access data inside this pointer, it's up to the probe (or automatic > probe generator, hum ?) to do it. Of course, but that precludes a general client tool, such as (say) a trace-only handler. > > > I think that duplicating the number of marker macros could easily make > > > them unflexible and ugly. [...] > > > > Inflexible and ugly in what way? [...] > > I don't expect the kernel programmer community to accept that their code will > call an automatically generated macro. It removes all the idea of "I can see > what code is actually generated by my function", which I believe is necessary. Not at all - the generated macros can sit in-tree and are easily inspected. Check out gen-stapmark.h and stapmark.h at . > Also, people are used to the simplicity and flexibility of printf > style format strings. True, but is this in context of the existing tracing/probing facilities? Unless I'm mistaken, ltt functions doesn't use them; nor does blktrace. Other than printk, are there any? > Do you really expect people to start using various macros like > MARK_u_p_llu I don't know. Using gcc extensions such as __builtin_typeof() could automate the typing aspect, leaving only the arity as a programmer-visible text. > and start defining their own marker macro each time they want to add > a specific type ? Well, adding a new type would be at last as hard in the printf case. > [...] However, if you want to create probes that are type-safe, you > can then create a script that will extract all the format strings in > the markers section of the object and automatically generate all the > probes with their respective va_args setup at the beginning of the > probe. [...] This could work. OTOH this relies on an as-yet-unwritten script, and additional run-time costs (the parameter-by-parameter va_arg copying). I wonder if writing a functional back-end for these markers should be considered a corequisite for this work; or in the alternative, whether it's good enough to start putting markers into the code, and revamp their implementation later if necessary. - FChE - 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/