diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch new file mode 100644 index 00000000..eb84795a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0023-tracing-change-CPU-ring-buffer-state-from-tracing_cp.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 04098d77869c04c5bf703846783cb89b4297b2bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Vaibhav Nagarnaik <vnagarnaik@google.com> | ||
3 | Date: Thu, 3 May 2012 18:59:52 -0700 | ||
4 | Subject: [PATCH 23/49] tracing: change CPU ring buffer state from | ||
5 | tracing_cpumask | ||
6 | |||
7 | commit 71babb2705e2203a64c27ede13ae3508a0d2c16c upstream. | ||
8 | |||
9 | According to Documentation/trace/ftrace.txt: | ||
10 | |||
11 | tracing_cpumask: | ||
12 | |||
13 | This is a mask that lets the user only trace | ||
14 | on specified CPUS. The format is a hex string | ||
15 | representing the CPUS. | ||
16 | |||
17 | The tracing_cpumask currently doesn't affect the tracing state of | ||
18 | per-CPU ring buffers. | ||
19 | |||
20 | This patch enables/disables CPU recording as its corresponding bit in | ||
21 | tracing_cpumask is set/unset. | ||
22 | |||
23 | Link: http://lkml.kernel.org/r/1336096792-25373-3-git-send-email-vnagarnaik@google.com | ||
24 | |||
25 | Cc: Frederic Weisbecker <fweisbec@gmail.com> | ||
26 | Cc: Ingo Molnar <mingo@redhat.com> | ||
27 | Cc: Laurent Chavey <chavey@google.com> | ||
28 | Cc: Justin Teravest <teravest@google.com> | ||
29 | Cc: David Sharp <dhsharp@google.com> | ||
30 | Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com> | ||
31 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
32 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
33 | --- | ||
34 | kernel/trace/trace.c | 2 ++ | ||
35 | 1 file changed, 2 insertions(+) | ||
36 | |||
37 | diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c | ||
38 | index 7e4edd3..5638104 100644 | ||
39 | --- a/kernel/trace/trace.c | ||
40 | +++ b/kernel/trace/trace.c | ||
41 | @@ -2541,10 +2541,12 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf, | ||
42 | if (cpumask_test_cpu(cpu, tracing_cpumask) && | ||
43 | !cpumask_test_cpu(cpu, tracing_cpumask_new)) { | ||
44 | atomic_inc(&global_trace.data[cpu]->disabled); | ||
45 | + ring_buffer_record_disable_cpu(global_trace.buffer, cpu); | ||
46 | } | ||
47 | if (!cpumask_test_cpu(cpu, tracing_cpumask) && | ||
48 | cpumask_test_cpu(cpu, tracing_cpumask_new)) { | ||
49 | atomic_dec(&global_trace.data[cpu]->disabled); | ||
50 | + ring_buffer_record_enable_cpu(global_trace.buffer, cpu); | ||
51 | } | ||
52 | } | ||
53 | arch_spin_unlock(&ftrace_max_lock); | ||
54 | -- | ||
55 | 1.7.10 | ||
56 | |||