All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Cc: linux-kernel@vger.kernel.org, yrl.pp-manager.tt@hitachi.com,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH -tip 2/4] tracing: add a resize function for making one buffer equivalent to the other buffer
Date: Fri, 05 Oct 2012 12:59:08 -0400	[thread overview]
Message-ID: <1349456348.6755.59.camel@gandalf.local.home> (raw)
In-Reply-To: <20121002082715.9807.90791.stgit@falsita>

On Tue, 2012-10-02 at 17:27 +0900, Hiraku Toyooka wrote:
> Trace buffer size is now per-cpu, so that there are following two
> patterns in resize of the buffers.
> 
>   (1) resize per-cpu buffers to same given size
>   (2) resize per-cpu buffers to the other 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 other place. So this patch assembles
> them in a new function - resize_buffer_even().
> 
> Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: linux-kernel@vger.kernel.org
> ---
> 
>  kernel/trace/trace.c |   57 ++++++++++++++++++++++++++------------------------
>  1 files changed, 30 insertions(+), 27 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 08acf42..1e599e6 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -3017,6 +3017,31 @@ static void set_buffer_entries(struct trace_array *tr, unsigned long val)
>  		tr->data[cpu]->entries = val;
>  }
>  
> +/* resize @tr's buffer to the size of @size_tr's entries */
> +static int resize_buffer_even(struct trace_array *tr,

I don't mind this patch, but I just hate the name "resize_buffer_even".
What about "resize_buffer_duplicate_size"?

-- Steve



  reply	other threads:[~2012-10-05 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02  8:13 [PATCH -tip 0/4] tracing: make a snapshot feature available from userspace Hiraku Toyooka
2012-10-02  8:27 ` [PATCH -tip 1/4] tracing: change tracer's integer flags to bool Hiraku Toyooka
2012-11-14  6:43   ` [tip:perf/core] tracing: Change " tip-bot for Hiraku Toyooka
2012-10-02  8:27 ` [PATCH -tip 2/4] tracing: add a resize function for making one buffer equivalent to the other buffer Hiraku Toyooka
2012-10-05 16:59   ` Steven Rostedt [this message]
2012-10-17  2:47     ` Hiraku Toyooka
2012-10-17  2:57       ` Steven Rostedt
2012-10-02  8:27 ` [PATCH -tip 3/4] tracing: make a snapshot feature available from userspace Hiraku Toyooka
2012-10-02  8:27 ` [PATCH -tip 4/4] tracing: add description of snapshot to Documentation/trace/ftrace.txt Hiraku Toyooka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349456348.6755.59.camel@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=hiraku.toyooka.gu@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.