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 | |
| 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')
| -rw-r--r-- | include/linux/ftrace.h | 6 | ||||
| -rw-r--r-- | include/linux/kernel.h | 13 | ||||
| -rw-r--r-- | include/linux/ring_buffer.h | 6 |
3 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 72a6cabb4d5b..0b5590330bca 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -286,6 +286,12 @@ struct ftrace_rec_iter *ftrace_rec_iter_start(void); | |||
| 286 | struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter); | 286 | struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter); |
| 287 | struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter); | 287 | struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter); |
| 288 | 288 | ||
| 289 | #define for_ftrace_rec_iter(iter) \ | ||
| 290 | for (iter = ftrace_rec_iter_start(); \ | ||
| 291 | iter; \ | ||
| 292 | iter = ftrace_rec_iter_next(iter)) | ||
| 293 | |||
| 294 | |||
| 289 | int ftrace_update_record(struct dyn_ftrace *rec, int enable); | 295 | int ftrace_update_record(struct dyn_ftrace *rec, int enable); |
| 290 | int ftrace_test_record(struct dyn_ftrace *rec, int enable); | 296 | int ftrace_test_record(struct dyn_ftrace *rec, int enable); |
| 291 | void ftrace_run_stop_machine(int command); | 297 | void ftrace_run_stop_machine(int command); |
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) |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 7be2e88f23fd..6c8835f74f79 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
| @@ -96,9 +96,11 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k | |||
| 96 | __ring_buffer_alloc((size), (flags), &__key); \ | 96 | __ring_buffer_alloc((size), (flags), &__key); \ |
| 97 | }) | 97 | }) |
| 98 | 98 | ||
| 99 | #define RING_BUFFER_ALL_CPUS -1 | ||
| 100 | |||
| 99 | void ring_buffer_free(struct ring_buffer *buffer); | 101 | void ring_buffer_free(struct ring_buffer *buffer); |
| 100 | 102 | ||
| 101 | int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size); | 103 | int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, int cpu); |
| 102 | 104 | ||
| 103 | void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val); | 105 | void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val); |
| 104 | 106 | ||
| @@ -129,7 +131,7 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts); | |||
| 129 | void ring_buffer_iter_reset(struct ring_buffer_iter *iter); | 131 | void ring_buffer_iter_reset(struct ring_buffer_iter *iter); |
| 130 | int ring_buffer_iter_empty(struct ring_buffer_iter *iter); | 132 | int ring_buffer_iter_empty(struct ring_buffer_iter *iter); |
| 131 | 133 | ||
| 132 | unsigned long ring_buffer_size(struct ring_buffer *buffer); | 134 | unsigned long ring_buffer_size(struct ring_buffer *buffer, int cpu); |
| 133 | 135 | ||
| 134 | void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu); | 136 | void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu); |
| 135 | void ring_buffer_reset(struct ring_buffer *buffer); | 137 | void ring_buffer_reset(struct ring_buffer *buffer); |
