From patchwork Wed May 6 14:47:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 26916 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id E920BB7043 for ; Thu, 7 May 2009 00:47:23 +1000 (EST) Received: by ozlabs.org (Postfix) id D03D0DDF95; Thu, 7 May 2009 00:47:23 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id C190DDDF94 for ; Thu, 7 May 2009 00:47:23 +1000 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org X-Greylist: delayed 12244 seconds by postgrey-1.31 at ozlabs; Thu, 07 May 2009 00:47:21 EST Received: from mx3.mail.elte.hu (mx3.mail.elte.hu [157.181.1.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8333BDDDEE for ; Thu, 7 May 2009 00:47:21 +1000 (EST) Received: from elvis.elte.hu ([157.181.1.14]) by mx3.mail.elte.hu with esmtp (Exim) id 1M1iOu-0007yd-C5 from ; Wed, 06 May 2009 16:47:12 +0200 Received: by elvis.elte.hu (Postfix, from userid 1004) id 2E3DC3E213A; Wed, 6 May 2009 16:47:06 +0200 (CEST) Date: Wed, 6 May 2009 16:47:08 +0200 From: Ingo Molnar To: Steven Rostedt Message-ID: <20090506144708.GC29044@elte.hu> References: <20090506102918.GA23278@lst.de> <20090506105748.GE25203@elte.hu> <20090506110258.GA24850@lst.de> <20090506112301.GK25203@elte.hu> <1241618089.11379.22.camel@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1241618089.11379.22.camel@localhost.localdomain> User-Agent: Mutt/1.5.18 (2008-05-17) Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu; X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, cbe-oss-dev@ozlabs.org, Fr?d?ric Weisbecker , Christoph Hellwig Subject: Re: [Cbe-oss-dev] [PATCH, RFC] sputrace: use the generic event tracer X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org * Steven Rostedt wrote: > > On Wed, 2009-05-06 at 13:23 +0200, Ingo Molnar wrote: > > > > > > +# magic for the trace events > > > > > +CFLAGS_sched.o := -I$(src) > > > > > > > > Steve, i'm wondering whether this type of Makefile hackery (caused > > > > by modular tracepoints) could be eliminated ... > > > > > > We would just have to include the header file with "" instead of > > > <>. But I remember Steve not liking this when we talked about it. > > > > Yeah. But changing Makefiles isnt particularly clean either ... > > > > And adding -I$(src) can have side-effects: we often have a local > > foo.h while an include/linux/foo.h as well. > > That still would not conflict, because > > #include "foo.h" > > will not include "linux/foo.h" and > > #include > > will not include a local foo.h, unless there's also a local "linux" > directory with a foo.h in it. > > The Makefile hack has to do with being able to have the "foo.h" > file with the TRACE_EVENTs someplace other than include/trace. > > If the "foo.h" is in include/trace.h we do not need to include > this hack. But because the include/trace/define_trace.h needs to > include the "foo.h" file recursively, it must be able to find it. > If we do not add a search path, include/trace/define_trace.h will > not look in the other locations. > > Note, as Christoph did, we only need to add the include path to > the file that defines "CREATE_TRACE_POINTS". Which is only one > file. > > CFLAGS_sched.o := -I$(src) > > Only touches the sched.c file in that directory (Note, for those > reading this thread out of context, this is not the same file as > kernel/sched.c) Yeah, i guess we can live with it. It still feels imperfect though. (btw., find below a small typo fix) Ingo diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index f7a7ae1..1d6fa17 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h @@ -1,5 +1,5 @@ /* - * Trace files that want to automate creationg of all tracepoints defined + * Trace files that want to automate the creation of all tracepoints defined * in their file should include this file. The following are macros that the * trace file may define: *