lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 2/2] [PATCH 2/2] tracing: Make event based trace_printk()
On 11/18/2010 11:58 AM, Steven Rostedt wrote:
> +#define trace_printk(fmt, args...) \
> + do { \
> + static struct event_printk_struct \
> + __attribute__((__aligned__(4))) \
> + __attribute__((section("_trace_printk"))) \
> + ______t = { \
> + .format = fmt, \

if fmt is not constant, the compiler will complain...

> + .func = __func__, \
> + .file = __FILE__, \
> + .line = __LINE__, \
> + }; \
> + __trace_printk_check_format(fmt, ##args); \
> + if (!__builtin_constant_p(fmt)) \
> + trace_printk_can_only_have_constant_format(); \

so this is not need.

> + if (unlikely(__event_printk_test(&______t.enable))) \
> + __trace_bprintk(_THIS_IP_, fmt, ##args); \
> + } while (0)



\
 
 \ /
  Last update: 2010-11-18 06:47    [W:0.306 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site