diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:40:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:40:50 -0500 |
commit | 8655e7e3ddec60603c4f6c14cdf642e2ba198df8 (patch) | |
tree | 711b6da2a665e26940c59b9db493c59d879f6cc6 /kernel/trace/ring_buffer.c | |
parent | 461d208cfbd1f0af26027b2c35ded515e54b1ee6 (diff) | |
parent | b6345879ccbd9b92864fbd7eb8ac48acdb4d6b15 (diff) |
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tracing: Do not record user stack trace from NMI context
tracing: Disable buffer switching when starting or stopping trace
tracing: Use same local variable when resetting the ring buffer
function-graph: Init curr_ret_stack with ret_stack
ring-buffer: Move disabled check into preempt disable section
function-graph: Add tracing_thresh support to function_graph tracer
tracing: Update the comm field in the right variable in update_max_tr
function-graph: Use comment notation for func names of dangling '}'
function-graph: Fix unused reference to ftrace_set_func()
tracing: Fix warning in s_next of trace file ops
tracing: Include irqflags headers from trace clock
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index a2f0fe951831..05a9f83b8819 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -2233,12 +2233,12 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length) | |||
2233 | if (ring_buffer_flags != RB_BUFFERS_ON) | 2233 | if (ring_buffer_flags != RB_BUFFERS_ON) |
2234 | return NULL; | 2234 | return NULL; |
2235 | 2235 | ||
2236 | if (atomic_read(&buffer->record_disabled)) | ||
2237 | return NULL; | ||
2238 | |||
2239 | /* If we are tracing schedule, we don't want to recurse */ | 2236 | /* If we are tracing schedule, we don't want to recurse */ |
2240 | resched = ftrace_preempt_disable(); | 2237 | resched = ftrace_preempt_disable(); |
2241 | 2238 | ||
2239 | if (atomic_read(&buffer->record_disabled)) | ||
2240 | goto out_nocheck; | ||
2241 | |||
2242 | if (trace_recursive_lock()) | 2242 | if (trace_recursive_lock()) |
2243 | goto out_nocheck; | 2243 | goto out_nocheck; |
2244 | 2244 | ||
@@ -2470,11 +2470,11 @@ int ring_buffer_write(struct ring_buffer *buffer, | |||
2470 | if (ring_buffer_flags != RB_BUFFERS_ON) | 2470 | if (ring_buffer_flags != RB_BUFFERS_ON) |
2471 | return -EBUSY; | 2471 | return -EBUSY; |
2472 | 2472 | ||
2473 | if (atomic_read(&buffer->record_disabled)) | ||
2474 | return -EBUSY; | ||
2475 | |||
2476 | resched = ftrace_preempt_disable(); | 2473 | resched = ftrace_preempt_disable(); |
2477 | 2474 | ||
2475 | if (atomic_read(&buffer->record_disabled)) | ||
2476 | goto out; | ||
2477 | |||
2478 | cpu = raw_smp_processor_id(); | 2478 | cpu = raw_smp_processor_id(); |
2479 | 2479 | ||
2480 | if (!cpumask_test_cpu(cpu, buffer->cpumask)) | 2480 | if (!cpumask_test_cpu(cpu, buffer->cpumask)) |