lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 4/4] trace: change CPU ring buffer state from tracing_cpumask
    Date
    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 abf1108..e25672e 100644
    --- a/kernel/trace/trace.c
    +++ b/kernel/trace/trace.c
    @@ -2592,10 +2592,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);
    --
    1.7.7.3


    \
     
     \ /
      Last update: 2012-02-02 21:03    [W:0.022 / U:97.612 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site