lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-71babb2705e2203a64c27ede13ae3508a0d2c16c@git.kernel.org>
Date:	Sat, 19 May 2012 03:21:45 -0700
From:	tip-bot for Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org,
	vnagarnaik@...gle.com, hpa@...or.com, mingo@...nel.org,
	dhsharp@...gle.com, fweisbec@...il.com, rostedt@...dmis.org,
	chavey@...gle.com, tglx@...utronix.de, teravest@...gle.com
Subject: [tip:perf/core] tracing:
  change CPU ring buffer state from tracing_cpumask

Commit-ID:  71babb2705e2203a64c27ede13ae3508a0d2c16c
Gitweb:     http://git.kernel.org/tip/71babb2705e2203a64c27ede13ae3508a0d2c16c
Author:     Vaibhav Nagarnaik <vnagarnaik@...gle.com>
AuthorDate: Thu, 3 May 2012 18:59:52 -0700
Committer:  Steven Rostedt <rostedt@...dmis.org>
CommitDate: Wed, 16 May 2012 19:50:38 -0400

tracing: change CPU ring buffer state from tracing_cpumask

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.

Link: http://lkml.kernel.org/r/1336096792-25373-3-git-send-email-vnagarnaik@google.com

Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Laurent Chavey <chavey@...gle.com>
Cc: Justin Teravest <teravest@...gle.com>
Cc: David Sharp <dhsharp@...gle.com>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
---
 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 0ed4df0..08a08ba 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2669,10 +2669,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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ