]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ring-buffer: Move recursive check to per_cpu descriptor
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 27 May 2015 14:27:47 +0000 (10:27 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 27 May 2015 14:42:36 +0000 (10:42 -0400)
commit58a09ec6e3ec88c9c7e061479f1ef7fe93324a87
tree5a9637b59aeb747978c4079823f98f02b3bf6e76
parent3205f8063b6cc54b20d5080fb79dfcbd9c39e93d
ring-buffer: Move recursive check to per_cpu descriptor

Instead of using a global per_cpu variable to perform the recursive
checks into the ring buffer, use the already existing per_cpu descriptor
that is part of the ring buffer itself.

Not only does this simplify the code, it also allows for one ring buffer
to be used within the guts of the use of another ring buffer. For example
trace_printk() can now be used within the ring buffer to record changes
done by an instance into the main ring buffer. The recursion checks
will prevent the trace_printk() itself from causing recursive issues
with the main ring buffer (it is just ignored), but the recursive
checks wont prevent the trace_printk() from recording other ring buffers.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c