]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita76c351ccbc82a184005a18248929ce1fa9b3cdc
treeb9d32b5ac2061c2c86f0e9d074349f70d8d52199
parent90a98a3f3192652529de03b014d0b0d92f19ce5a
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