From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Problem with CREATE_TRACE_POINTS and recursion safety
Date: Wed, 15 Apr 2009 19:50:21 -0700 [thread overview]
Message-ID: <49E69CED.9050706@goop.org> (raw)
In-Reply-To: <20090416022305.GA22378@Krystal>
Mathieu Desnoyers wrote:
> Jeremy brings up an interesting point. Given that we might eventually
> include a few tracepoint header files in a given C file, but with the
> intent of only "creating" the tracepoint callbacks for few of these, the
> global "CREATE_TRACE_POINTS" flag makes little sense and seems like it
> will easily lead to link-time errors.
>
Yes, that's what I'm seeing.
> Maybe we could consider requiring something like the following solution :
>
> In the .c file :
>
> #define CREATE_TRACE_POINTS
> #include <trace/subsysa.h>
> #undef CREATE_TRACE_POINTS
>
> #include <trace/subsysb.h>
>
> Where subsysa has its trace points callbacks created, but subsysb
> doesn't. This seems half-way understandable, at least.
But what if trace/subsysa.h includes some other headers to define some
types it needs, which in turn ends up incidentally including
trace/subsysc.h (either directly, or indirectly via any number of other
headers? Then it will end up instantiating tracepoints for subsysa and
subsysc. The only way to avoid it would be to impose an absolutely
strict separation of type/constant definition headers from
function/tracepoint ones.
J
next prev parent reply other threads:[~2009-04-16 2:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 0:34 Problem with CREATE_TRACE_POINTS and recursion safety Jeremy Fitzhardinge
2009-04-16 0:56 ` Steven Rostedt
2009-04-16 1:06 ` Jeremy Fitzhardinge
2009-04-16 2:02 ` Steven Rostedt
2009-04-16 2:23 ` Mathieu Desnoyers
2009-04-16 2:50 ` Jeremy Fitzhardinge [this message]
2009-04-16 3:09 ` Steven Rostedt
2009-04-16 11:09 ` Christoph Hellwig
2009-04-16 13:42 ` Steven Rostedt
2009-04-16 2:45 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49E69CED.9050706@goop.org \
--to=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox