Re: [PATCH 2/8] tracing: create automated trace defines

From: Jeremy Fitzhardinge
Date: Wed Apr 15 2009 - 12:08:35 EST


Mathieu Desnoyers wrote:
* Jeremy Fitzhardinge (jeremy@xxxxxxxx) wrote:
-#define __DO_TRACE(tp, proto, args) \
- do { \
+#define DEFINE_DO_TRACE(name, proto, args) \
+ void __do_trace_##name(struct tracepoint *tp, TP_PROTO(proto)) \

I fear that won't work with "void" prototype. If we need this kind of
flexibility, we will need to create a special case for empty prototype.

Yes, that has been a bit awkward. I couldn't find a way to create a no-param tracepoint, and so ended up passing a dummy arg. Stupid C syntax.

On the other hand, I can get something that actually compiles this way...

J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/