diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
| -rw-r--r-- | kernel/trace/ring_buffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 04dac2638258..bf27bb7a63e2 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
| @@ -1563,6 +1563,8 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer, | |||
| 1563 | return NULL; | 1563 | return NULL; |
| 1564 | } | 1564 | } |
| 1565 | 1565 | ||
| 1566 | #ifdef CONFIG_TRACING | ||
| 1567 | |||
| 1566 | #define TRACE_RECURSIVE_DEPTH 16 | 1568 | #define TRACE_RECURSIVE_DEPTH 16 |
| 1567 | 1569 | ||
| 1568 | static int trace_recursive_lock(void) | 1570 | static int trace_recursive_lock(void) |
| @@ -1593,6 +1595,13 @@ static void trace_recursive_unlock(void) | |||
| 1593 | current->trace_recursion--; | 1595 | current->trace_recursion--; |
| 1594 | } | 1596 | } |
| 1595 | 1597 | ||
| 1598 | #else | ||
| 1599 | |||
| 1600 | #define trace_recursive_lock() (0) | ||
| 1601 | #define trace_recursive_unlock() do { } while (0) | ||
| 1602 | |||
| 1603 | #endif | ||
| 1604 | |||
| 1596 | static DEFINE_PER_CPU(int, rb_need_resched); | 1605 | static DEFINE_PER_CPU(int, rb_need_resched); |
| 1597 | 1606 | ||
| 1598 | /** | 1607 | /** |
| @@ -3104,6 +3113,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, | |||
| 3104 | } | 3113 | } |
| 3105 | EXPORT_SYMBOL_GPL(ring_buffer_read_page); | 3114 | EXPORT_SYMBOL_GPL(ring_buffer_read_page); |
| 3106 | 3115 | ||
| 3116 | #ifdef CONFIG_TRACING | ||
| 3107 | static ssize_t | 3117 | static ssize_t |
| 3108 | rb_simple_read(struct file *filp, char __user *ubuf, | 3118 | rb_simple_read(struct file *filp, char __user *ubuf, |
| 3109 | size_t cnt, loff_t *ppos) | 3119 | size_t cnt, loff_t *ppos) |
| @@ -3171,6 +3181,7 @@ static __init int rb_init_debugfs(void) | |||
| 3171 | } | 3181 | } |
| 3172 | 3182 | ||
| 3173 | fs_initcall(rb_init_debugfs); | 3183 | fs_initcall(rb_init_debugfs); |
| 3184 | #endif | ||
| 3174 | 3185 | ||
| 3175 | #ifdef CONFIG_HOTPLUG_CPU | 3186 | #ifdef CONFIG_HOTPLUG_CPU |
| 3176 | static int rb_cpu_notify(struct notifier_block *self, | 3187 | static int rb_cpu_notify(struct notifier_block *self, |
