All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Wang YanQing <udknight@gmail.com>
Cc: fweisbec@gmail.com, mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] trace: show more and exactly help information about snapshot
Date: Sat, 14 Sep 2013 07:31:38 -0400	[thread overview]
Message-ID: <20130914073138.1cd6026c@gandalf.local.home> (raw)
In-Reply-To: <20130914045916.GA4243@udknight>

On Sat, 14 Sep 2013 12:59:16 +0800
Wang YanQing <udknight@gmail.com> wrote:

> Actually, they both are correct:
> 
> 	default:
> 		if (tr->allocated_snapshot) {
> 			if (iter->cpu_file == RING_BUFFER_ALL_CPUS)
> 				tracing_reset_online_cpus(&tr->max_buffer);
> 			else
> 				tracing_reset(&tr->max_buffer,	iter->cpu_file);
> 		}
> 		break;
> 	}
> 
> It does nothing if it isn't allocated.
> 
> Perhaps we need it to say "(but does not allocate or free)"
> 
> -- Steve
> 
> Signed-off-by: Wang YanQing <udknight@gmail.com>
> ---
>  I think "Clears and frees" are reasonable, and
>  "Clears and allocates are not so reasonable, so
>  we don't need to say not allocate. But it is help 
>  information, so make it more clearer is also acceptable. :)

I'm getting ready to go to Linux Con / Linux Plumbers. I wont be able to
get to this before, and may not be able to get to it while I'm there.
As the original is technically correct, I'll put this into my 3.13
queue.

Thanks,

-- Steve


>  
>  kernel/trace/trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 7974ba2..d5f7c4d 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -2760,7 +2760,7 @@ static void show_snapshot_main_help(struct seq_file *m)
>  	seq_printf(m, "# echo 0 > snapshot : Clears and frees snapshot buffer\n");
>  	seq_printf(m, "# echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.\n");
>  	seq_printf(m, "#                      Takes a snapshot of the main buffer.\n");
> -	seq_printf(m, "# echo 2 > snapshot : Clears snapshot buffer (but does not allocate)\n");
> +	seq_printf(m, "# echo 2 > snapshot : Clears snapshot buffer (but does not allocate or free)\n");
>  	seq_printf(m, "#                      (Doesn't have to be '2' works with any number that\n");
>  	seq_printf(m, "#                       is not a '0' or '1')\n");
>  }


      reply	other threads:[~2013-09-14 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-14  4:59 [PATCH v2] trace: show more and exactly help information about snapshot Wang YanQing
2013-09-14 11:31 ` Steven Rostedt [this message]

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=20130914073138.1cd6026c@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=udknight@gmail.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.