tracing: Add a resize function to make one buffer equivalent to another buffer
authorHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Wed, 17 Oct 2012 02:56:16 +0000 (11:56 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 15 Nov 2012 22:10:21 +0000 (17:10 -0500)
commitd60da506cbeb3f1907a740547dd7ef04a93e908e
treeb9d32b5ac2061c2c86f0e9d074349f70d8d52199
parent1c7d66732458dc187008e3f5b2f71e019e320fc2
tracing: Add a resize function to make one buffer equivalent to another buffer

Trace buffer size is now per-cpu, so that there are the following two
patterns in resizing of buffers.

  (1) resize per-cpu buffers to same given size
  (2) resize per-cpu buffers to another trace_array's buffer size
      for each CPU (such as preparing the max_tr which is equivalent
      to the global_trace's size)

__tracing_resize_ring_buffer() can be used for (1), and had
implemented (2) inside it for resetting the global_trace to the
original size.

(2) was also implemented in another place. So this patch assembles
them in a new function - resize_buffer_duplicate_size().

Link: http://lkml.kernel.org/r/20121017025616.2627.91226.stgit@falsita
Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c