diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-05-07 05:03:52 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-05-07 05:03:52 -0400 |
| commit | 19631cb3d67c24c8b1fa58bc69bc2fed8d15095d (patch) | |
| tree | a56d9e11f23e3433f9eaa5b3f9dec7bef378c37e /include/linux/kernel.h | |
| parent | 1fa2e84db3f95adab8d9c2aa245e9a0ebf32248a (diff) | |
| parent | 59a094c994a138049b41a44bc29cff9407d51c5b (diff) | |
Merge branch 'tip/perf/core-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 645231c373c8..c0d34420a913 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -480,15 +480,16 @@ do { \ | |||
| 480 | 480 | ||
| 481 | #define trace_printk(fmt, args...) \ | 481 | #define trace_printk(fmt, args...) \ |
| 482 | do { \ | 482 | do { \ |
| 483 | static const char *trace_printk_fmt \ | ||
| 484 | __attribute__((section("__trace_printk_fmt"))) = \ | ||
| 485 | __builtin_constant_p(fmt) ? fmt : NULL; \ | ||
| 486 | \ | ||
| 483 | __trace_printk_check_format(fmt, ##args); \ | 487 | __trace_printk_check_format(fmt, ##args); \ |
| 484 | if (__builtin_constant_p(fmt)) { \ | ||
| 485 | static const char *trace_printk_fmt \ | ||
| 486 | __attribute__((section("__trace_printk_fmt"))) = \ | ||
| 487 | __builtin_constant_p(fmt) ? fmt : NULL; \ | ||
| 488 | \ | 488 | \ |
| 489 | if (__builtin_constant_p(fmt)) \ | ||
| 489 | __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \ | 490 | __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \ |
| 490 | } else \ | 491 | else \ |
| 491 | __trace_printk(_THIS_IP_, fmt, ##args); \ | 492 | __trace_printk(_THIS_IP_, fmt, ##args); \ |
| 492 | } while (0) | 493 | } while (0) |
| 493 | 494 | ||
| 494 | extern __printf(2, 3) | 495 | extern __printf(2, 3) |
