All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vaibhav Nagarnaik <vnagarnaik@google.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Cc: Michael Rubin <mrubin@google.com>,
	David Sharp <dhsharp@google.com>,
	linux-kernel@vger.kernel.org,
	Vaibhav Nagarnaik <vnagarnaik@google.com>
Subject: Re: [PATCH] trace: change CPU ring buffer state from tracing_cpumask
Date: Tue, 30 Aug 2011 18:07:45 -0700	[thread overview]
Message-ID: <CAL26m8KPDHPbad5y5ZYm4vY6i5TcgJ+tZSsT=r709dS9jX290Q@mail.gmail.com> (raw)
In-Reply-To: <1311210299-12607-1-git-send-email-vnagarnaik@google.com>

On Wed, Jul 20, 2011 at 6:04 PM, Vaibhav Nagarnaik
<vnagarnaik@google.com> wrote:
> According to Documentation/trace/ftrace.txt:
>
> tracing_cpumask:
>
>        This is a mask that lets the user only trace
>        on specified CPUS. The format is a hex string
>        representing the CPUS.
>
> The tracing_cpumask currently doesn't affect the tracing state of
> per-CPU ring buffers.
>
> This patch enables/disables CPU recording as its corresponding bit in
> tracing_cpumask is set/unset.
>
> Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
> ---
>  kernel/trace/trace.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index e8aa324..d8ed798 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -2433,10 +2433,12 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
>                if (cpumask_test_cpu(cpu, tracing_cpumask) &&
>                                !cpumask_test_cpu(cpu, tracing_cpumask_new)) {
>                        atomic_inc(&global_trace.data[cpu]->disabled);
> +                       ring_buffer_record_disable_cpu(global_trace.buffer, cpu);
>                }
>                if (!cpumask_test_cpu(cpu, tracing_cpumask) &&
>                                cpumask_test_cpu(cpu, tracing_cpumask_new)) {
>                        atomic_dec(&global_trace.data[cpu]->disabled);
> +                       ring_buffer_record_enable_cpu(global_trace.buffer, cpu);
>                }
>        }
>        arch_spin_unlock(&ftrace_max_lock);

Hi Steve

What do you think about this patch?

Vaibhav Nagarnaik

  reply	other threads:[~2011-08-31  1:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  1:04 [PATCH] trace: change CPU ring buffer state from tracing_cpumask Vaibhav Nagarnaik
2011-08-31  1:07 ` Vaibhav Nagarnaik [this message]
2011-08-31  2:03   ` Steven Rostedt

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='CAL26m8KPDHPbad5y5ZYm4vY6i5TcgJ+tZSsT=r709dS9jX290Q@mail.gmail.com' \
    --to=vnagarnaik@google.com \
    --cc=dhsharp@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mrubin@google.com \
    --cc=rostedt@goodmis.org \
    /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.