Simplifying the declaration may help
Posted Apr 28, 2009 19:26 UTC (Tue) by
dw (subscriber, #12017)
Parent article:
On the value of static tracepoints
While I appreciate the value of trace points, if someone said they'd add 30 lines of macros to my lovely code because it might benefit a user someday, I'd probably not take kindly to it either.
The printk support doesn't seem useful, it's like a design argument was abandoned in favour of implementing both sides of the debate. Even with printk, it should be possible to combine instantiation + declaration like so:
#define TRACE_EVENT(name, assign, fields...)
TRACE_EVENT(mm_page_allocation,
({ t->pfn = pfn; t->free = free; }),
unsigned long pfn, unsigned long free)
The fields argument could be stringified with cpp's paste operator and converted to a format string on first use at runtime, or perhaps by reading debug information during the build.
(
Log in to post comments)